Skip to content

Commit 8d93dde

Browse files
authored
Merge pull request v923z#428 from v923z/fix-4d
fix sum for 4D arrays
2 parents d8a4dbb + 593a33d commit 8d93dde

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

code/numpy/numerical.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static mp_obj_t numerical_all_any(mp_obj_t oin, mp_obj_t axis, uint8_t optype) {
181181
array -= _shape_strides.strides[ULAB_MAX_DIMS - 2] * _shape_strides.shape[ULAB_MAX_DIMS - 2];
182182
array += _shape_strides.strides[ULAB_MAX_DIMS - 3];
183183
i++;
184-
} while(i < _shape_strides.shape[ULAB_MAX_DIMS - 3])
184+
} while(i < _shape_strides.shape[ULAB_MAX_DIMS - 3]);
185185
#endif
186186
return results;
187187
} else if(mp_obj_is_int(oin) || mp_obj_is_float(oin)) {

code/numpy/numerical.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@
444444
#endif
445445

446446
#if ULAB_MAX_DIMS == 4
447-
#define RUN_SUM(type, array, results, rarray, shape, strides, index) do {\
447+
#define RUN_SUM(type, array, results, rarray, ss) do {\
448448
size_t j = 0;\
449449
do {\
450450
size_t k = 0;\

code/ulab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "user/user.h"
3434
#include "utils/utils.h"
3535

36-
#define ULAB_VERSION 3.3.0
36+
#define ULAB_VERSION 3.3.1
3737
#define xstr(s) str(s)
3838
#define str(s) #s
3939
#define ULAB_VERSION_STRING xstr(ULAB_VERSION) xstr(-) xstr(ULAB_MAX_DIMS) xstr(D)

docs/ulab-change-log.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
Thu, 22 Jul 2021
22

3+
version 3.3.1
4+
5+
fix sum for 4D arrays
6+
7+
Thu, 22 Jul 2021
8+
39
version 3.3.0
410

511
add QR decomposition
@@ -9,7 +15,7 @@ Tue, 13 Jul 2021
915
version 3.2.0
1016

1117
add flatiter/flat to ndarray methods
12-
18+
1319
Tue, 22 Jun 2021
1420

1521
version 3.1.1

0 commit comments

Comments
 (0)