Skip to content

Commit d62d07e

Browse files
authored
Merge pull request #283 from mdaeron/master
Should close #282
2 parents 18c9747 + 734a289 commit d62d07e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

code/ndarray.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ mp_obj_t ndarray_tobytes(mp_obj_t self_in) {
15541554
if(!ndarray_is_dense(self)) {
15551555
mp_raise_ValueError(translate("tobytes can be invoked for dense arrays only"));
15561556
}
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);
15581558
}
15591559

15601560
MP_DEFINE_CONST_FUN_OBJ_1(ndarray_tobytes_obj, ndarray_tobytes);

code/ulab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "user/user.h"
3333
#include "vector/vectorise.h"
3434

35-
#define ULAB_VERSION 1.6.0
35+
#define ULAB_VERSION 1.6.1
3636
#define xstr(s) str(s)
3737
#define str(s) #s
3838
#if ULAB_NUMPY_COMPATIBILITY

docs/ulab-change-log.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Mon, 11 Jan 2021
2+
3+
version 1.6.1
4+
5+
fix #282
6+
17
Tue, 24 Nov 2020
28

39
version 1.6.0

0 commit comments

Comments
 (0)