Skip to content

Commit 3e996d9

Browse files
authored
fix ndarray subscription method (#619)
1 parent 6619c20 commit 3e996d9

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

code/ndarray.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,9 @@ static mp_obj_t ndarray_get_slice(ndarray_obj_t *ndarray, mp_obj_t index, ndarra
14381438
}
14391439

14401440
mp_obj_t ndarray_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
1441+
if(value == MP_OBJ_NULL) {
1442+
mp_raise_ValueError(translate("cannot delete array elements"));
1443+
}
14411444
ndarray_obj_t *self = MP_OBJ_TO_PTR(self_in);
14421445

14431446
if (value == MP_OBJ_SENTINEL) { // return value(s)

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 6.0.12
36+
#define ULAB_VERSION 6.1.1
3737
#define xstr(s) str(s)
3838
#define str(s) #s
3939

docs/ulab-change-log.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
Wed, 17 May 2023
2+
3+
version 6.1.1
4+
5+
fix ndarray subscription, when value is NULL
6+
7+
Tue, 16 May 2023
8+
9+
version 6.1.0
10+
11+
add sinc function
12+
113
Sun, 7 May 2023
214

315
version 6.0.12

0 commit comments

Comments
 (0)