Skip to content

Commit

Permalink
fixed small bug in rawsize
Browse files Browse the repository at this point in the history
  • Loading branch information
v923z committed Oct 19, 2019
1 parent 8d4d812 commit 5599dd2
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 32 deletions.
4 changes: 2 additions & 2 deletions code/ndarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ mp_obj_t ndarray_rawsize(mp_obj_t self_in) {
mp_obj_tuple_t *tuple = MP_OBJ_TO_PTR(mp_obj_new_tuple(5, NULL));
tuple->items[0] = MP_OBJ_NEW_SMALL_INT(self->m);
tuple->items[1] = MP_OBJ_NEW_SMALL_INT(self->n);
tuple->items[2] = MP_OBJ_NEW_SMALL_INT(self->bytes);
tuple->items[3] = MP_OBJ_NEW_SMALL_INT(self->array->len);
tuple->items[2] = MP_OBJ_NEW_SMALL_INT(self->array->len);
tuple->items[3] = MP_OBJ_NEW_SMALL_INT(self->bytes);
tuple->items[4] = MP_OBJ_NEW_SMALL_INT(mp_binary_get_size('@', self->array->typecode, NULL));
return tuple;
}
Expand Down
2 changes: 1 addition & 1 deletion code/ulab.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "fft.h"
#include "numerical.h"

#define ULAB_VERSION 0.22
#define ULAB_VERSION 0.221

typedef struct _mp_obj_float_t {
mp_obj_base_t base;
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/source/ulab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ following data
.. parsed-literal::
a: array([1.0, 2.0, 3.0, 4.0], dtype=float)
rawsize of a: (1, 4, 16, 4, 4)
rawsize of a: (1, 4, 4, 16, 4)
Expand Down
6 changes: 6 additions & 0 deletions docs/ulab-change-log.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

Sat, 19 Oct 2019

version 0.21

fixed trivial bug in .rawsize()

Sat, 19 Oct 2019

version 0.22

fixed small error in linalg_det, and implemented linalg_eig.
Expand Down
14 changes: 7 additions & 7 deletions docs/ulab-manual.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
},
{
"cell_type": "code",
"execution_count": 509,
"execution_count": 511,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-19T14:42:41.403101Z",
"start_time": "2019-10-19T14:42:38.486299Z"
"end_time": "2019-10-19T17:44:46.666037Z",
"start_time": "2019-10-19T17:44:40.234797Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -852,11 +852,11 @@
},
{
"cell_type": "code",
"execution_count": 338,
"execution_count": 510,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-16T18:06:59.346779Z",
"start_time": "2019-10-16T18:06:59.329633Z"
"end_time": "2019-10-19T17:44:26.983908Z",
"start_time": "2019-10-19T17:44:26.764912Z"
}
},
"outputs": [
Expand All @@ -865,7 +865,7 @@
"output_type": "stream",
"text": [
"a: \t\t array([1.0, 2.0, 3.0, 4.0], dtype=float)\n",
"rawsize of a: \t (1, 4, 16, 4, 4)\n",
"rawsize of a: \t (1, 4, 4, 16, 4)\n",
"\n",
"\n"
]
Expand Down
48 changes: 27 additions & 21 deletions docs/ulab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3268,11 +3268,11 @@
},
{
"cell_type": "code",
"execution_count": 1587,
"execution_count": 2004,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-16T17:38:52.753239Z",
"start_time": "2019-10-16T17:38:52.736463Z"
"end_time": "2019-10-19T17:42:45.677324Z",
"start_time": "2019-10-19T17:42:45.490318Z"
},
"code_folding": []
},
Expand Down Expand Up @@ -3750,8 +3750,8 @@
" mp_obj_tuple_t *tuple = MP_OBJ_TO_PTR(mp_obj_new_tuple(5, NULL));\n",
" tuple->items[0] = MP_OBJ_NEW_SMALL_INT(self->m);\n",
" tuple->items[1] = MP_OBJ_NEW_SMALL_INT(self->n);\n",
" tuple->items[2] = MP_OBJ_NEW_SMALL_INT(self->bytes);\n",
" tuple->items[3] = MP_OBJ_NEW_SMALL_INT(self->array->len);\n",
" tuple->items[2] = MP_OBJ_NEW_SMALL_INT(self->array->len);\n",
" tuple->items[3] = MP_OBJ_NEW_SMALL_INT(self->bytes);\n",
" tuple->items[4] = MP_OBJ_NEW_SMALL_INT(mp_binary_get_size('@', self->array->typecode, NULL));\n",
" return tuple;\n",
"}\n",
Expand Down Expand Up @@ -7372,19 +7372,19 @@
},
{
"cell_type": "code",
"execution_count": 1739,
"execution_count": 2005,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-18T05:05:31.400182Z",
"start_time": "2019-10-18T05:05:31.393637Z"
"end_time": "2019-10-19T17:43:07.366141Z",
"start_time": "2019-10-19T17:43:07.310569Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"written 9251 bytes to ulab.c\n"
"written 9252 bytes to ulab.c\n"
]
}
],
Expand All @@ -7407,7 +7407,7 @@
"#include \"fft.h\"\n",
"#include \"numerical.h\"\n",
"\n",
"#define ULAB_VERSION 0.22\n",
"#define ULAB_VERSION 0.221\n",
"\n",
"typedef struct _mp_obj_float_t {\n",
" mp_obj_base_t base;\n",
Expand Down Expand Up @@ -7630,11 +7630,11 @@
},
{
"cell_type": "code",
"execution_count": 1998,
"execution_count": 2007,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-19T10:19:10.037525Z",
"start_time": "2019-10-19T10:19:10.030764Z"
"end_time": "2019-10-19T17:43:56.451681Z",
"start_time": "2019-10-19T17:43:56.245572Z"
}
},
"outputs": [
Expand All @@ -7652,11 +7652,11 @@
},
{
"cell_type": "code",
"execution_count": 1999,
"execution_count": 2008,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-19T10:19:13.237640Z",
"start_time": "2019-10-19T10:19:11.638454Z"
"end_time": "2019-10-19T17:44:09.477233Z",
"start_time": "2019-10-19T17:43:58.317783Z"
},
"scrolled": false
},
Expand All @@ -7673,8 +7673,8 @@
"GEN build/genhdr/qstrdefs.collected.h\n",
"QSTR not updated\n",
"CC ../../py/objmodule.c\n",
"CC ../../../ulab/code/linalg.c\n",
"CC ../../../ulab/code/fft.c\n",
"CC ../../../ulab/code/ndarray.c\n",
"CC ../../../ulab/code/ulab.c\n",
"LINK micropython\n",
" text\t data\t bss\t dec\t hex\tfilename\n",
" 2085\t 6862\t 0\t 8947\t 22f3\tbuild/build/frozen_mpy.o\n",
Expand Down Expand Up @@ -7968,11 +7968,11 @@
},
{
"cell_type": "code",
"execution_count": 1993,
"execution_count": 2006,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-19T09:54:07.331139Z",
"start_time": "2019-10-19T09:54:07.303821Z"
"end_time": "2019-10-19T17:43:40.887777Z",
"start_time": "2019-10-19T17:43:40.842588Z"
}
},
"outputs": [
Expand All @@ -7989,6 +7989,12 @@
"\n",
"Sat, 19 Oct 2019\n",
"\n",
"version 0.21\n",
"\n",
" fixed trivial bug in .rawsize()\n",
"\n",
"Sat, 19 Oct 2019\n",
"\n",
"version 0.22\n",
"\n",
" fixed small error in linalg_det, and implemented linalg_eig.\n",
Expand Down

0 comments on commit 5599dd2

Please sign in to comment.