File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1554,7 +1554,7 @@ mp_obj_t ndarray_tobytes(mp_obj_t self_in) {
1554
1554
if (!ndarray_is_dense (self )) {
1555
1555
mp_raise_ValueError (translate ("tobytes can be invoked for dense arrays only" ));
1556
1556
}
1557
- return mp_obj_new_bytearray_by_ref (self -> len , self -> array );
1557
+ return mp_obj_new_bytearray_by_ref (self -> itemsize * self -> len , self -> array );
1558
1558
}
1559
1559
1560
1560
MP_DEFINE_CONST_FUN_OBJ_1 (ndarray_tobytes_obj , ndarray_tobytes );
Original file line number Diff line number Diff line change 32
32
#include "user/user.h"
33
33
#include "vector/vectorise.h"
34
34
35
- #define ULAB_VERSION 1.6.0
35
+ #define ULAB_VERSION 1.6.1
36
36
#define xstr (s ) str(s)
37
37
#define str (s ) #s
38
38
#if ULAB_NUMPY_COMPATIBILITY
Original file line number Diff line number Diff line change
1
+ Mon, 11 Jan 2021
2
+
3
+ version 1.6.1
4
+
5
+ fix #282
6
+
1
7
Tue, 24 Nov 2020
2
8
3
9
version 1.6.0
You can’t perform that action at this time.
0 commit comments