fix ndarray subscription method (#619)

This commit is contained in:
Zoltán Vörös 2023-05-17 20:45:07 +02:00 committed by GitHub
parent 6619c20b3b
commit 3e996d9bd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View file

@ -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)

View file

@ -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

View file

@ -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