Skip to content

Commit

Permalink
fix ndarray subscription method (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
v923z committed May 17, 2023
1 parent 6619c20 commit 3e996d9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/ndarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,9 @@ static mp_obj_t ndarray_get_slice(ndarray_obj_t *ndarray, mp_obj_t index, ndarra
}

mp_obj_t ndarray_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
if(value == MP_OBJ_NULL) {
mp_raise_ValueError(translate("cannot delete array elements"));
}
ndarray_obj_t *self = MP_OBJ_TO_PTR(self_in);

if (value == MP_OBJ_SENTINEL) { // return value(s)
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 6.0.12
#define ULAB_VERSION 6.1.1
#define xstr(s) str(s)
#define str(s) #s

Expand Down
12 changes: 12 additions & 0 deletions docs/ulab-change-log.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Wed, 17 May 2023

version 6.1.1

fix ndarray subscription, when value is NULL
Tue, 16 May 2023

version 6.1.0

add sinc function

Sun, 7 May 2023

version 6.0.12
Expand Down

0 comments on commit 3e996d9

Please sign in to comment.