Skip to content

Commit

Permalink
Merge pull request #428 from v923z/fix-4d
Browse files Browse the repository at this point in the history
fix sum for 4D arrays
  • Loading branch information
v923z authored Jul 22, 2021
2 parents d8a4dbb + 593a33d commit 8d93dde
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/numpy/numerical.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static mp_obj_t numerical_all_any(mp_obj_t oin, mp_obj_t axis, uint8_t optype) {
array -= _shape_strides.strides[ULAB_MAX_DIMS - 2] * _shape_strides.shape[ULAB_MAX_DIMS - 2];
array += _shape_strides.strides[ULAB_MAX_DIMS - 3];
i++;
} while(i < _shape_strides.shape[ULAB_MAX_DIMS - 3])
} while(i < _shape_strides.shape[ULAB_MAX_DIMS - 3]);
#endif
return results;
} else if(mp_obj_is_int(oin) || mp_obj_is_float(oin)) {
Expand Down
2 changes: 1 addition & 1 deletion code/numpy/numerical.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
#endif

#if ULAB_MAX_DIMS == 4
#define RUN_SUM(type, array, results, rarray, shape, strides, index) do {\
#define RUN_SUM(type, array, results, rarray, ss) do {\
size_t j = 0;\
do {\
size_t k = 0;\
Expand Down
2 changes: 1 addition & 1 deletion code/ulab.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "user/user.h"
#include "utils/utils.h"

#define ULAB_VERSION 3.3.0
#define ULAB_VERSION 3.3.1
#define xstr(s) str(s)
#define str(s) #s
#define ULAB_VERSION_STRING xstr(ULAB_VERSION) xstr(-) xstr(ULAB_MAX_DIMS) xstr(D)
Expand Down
8 changes: 7 additions & 1 deletion docs/ulab-change-log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Thu, 22 Jul 2021

version 3.3.1

fix sum for 4D arrays

Thu, 22 Jul 2021

version 3.3.0

add QR decomposition
Expand All @@ -9,7 +15,7 @@ Tue, 13 Jul 2021
version 3.2.0

add flatiter/flat to ndarray methods

Tue, 22 Jun 2021

version 3.1.1
Expand Down

0 comments on commit 8d93dde

Please sign in to comment.