Skip to content

Commit

Permalink
Merge remote-tracking branch 'circuitpython/main' into thunderpack1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillick committed Nov 24, 2020
2 parents 4c5e752 + ebdc48a commit 570353b
Show file tree
Hide file tree
Showing 50 changed files with 937 additions and 271 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ jobs:
- "circuitplayground_express_displayio"
- "clue_nrf52840_express"
- "cp32-m4"
- "cp_sapling_m0"
- "datalore_ip_m4"
- "datum_distance"
- "datum_imu"
Expand Down
2 changes: 1 addition & 1 deletion extmod/machine_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
STATIC uintptr_t machine_mem_get_addr(mp_obj_t addr_o, uint align) {
uintptr_t addr = mp_obj_int_get_truncated(addr_o);
if ((addr & (align - 1)) != 0) {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, translate("address %08x is not aligned to %d bytes"), addr, align));
mp_raise_ValueError_varg(translate("address %08x is not aligned to %d bytes"), addr, align);
}
return addr;
}
Expand Down
2 changes: 1 addition & 1 deletion extmod/moduheapq.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_uheapq_heappush_obj, mod_uheapq_heappush);
STATIC mp_obj_t mod_uheapq_heappop(mp_obj_t heap_in) {
mp_obj_list_t *heap = get_heap(heap_in);
if (heap->len == 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, translate("empty heap")));
mp_raise_IndexError(translate("empty heap"));
}
mp_obj_t item = heap->items[0];
heap->len -= 1;
Expand Down
6 changes: 3 additions & 3 deletions extmod/modure.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ STATIC mp_obj_t match_group(mp_obj_t self_in, mp_obj_t no_in) {
mp_obj_match_t *self = MP_OBJ_TO_PTR(self_in);
mp_int_t no = mp_obj_get_int(no_in);
if (no < 0 || no >= self->num_matches) {
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, no_in));
mp_raise_arg1(&mp_type_IndexError, no_in);
}

const char *start = self->caps[no * 2];
Expand Down Expand Up @@ -82,7 +82,7 @@ STATIC void match_span_helper(size_t n_args, const mp_obj_t *args, mp_obj_t span
if (n_args == 2) {
no = mp_obj_get_int(args[1]);
if (no < 0 || no >= self->num_matches) {
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, args[1]));
mp_raise_arg1(&mp_type_IndexError, args[1]);
}
}

Expand Down Expand Up @@ -326,7 +326,7 @@ STATIC mp_obj_t re_sub_helper(mp_obj_t self_in, size_t n_args, const mp_obj_t *a
}

if (match_no >= (unsigned int)match->num_matches) {
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no)));
mp_raise_arg1(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no));
}

const char *start_match = match->caps[match_no * 2];
Expand Down
2 changes: 1 addition & 1 deletion extmod/moduzlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
return res;

error:
nlr_raise(mp_obj_new_exception_arg1(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st)));
mp_raise_arg1(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st));
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_uzlib_decompress);

Expand Down
2 changes: 1 addition & 1 deletion extmod/ulab
Submodule ulab updated 81 files
+2 −0 .gitignore
+34 −30 README.md
+240 −214 code/approx/approx.c
+6 −3 code/approx/approx.h
+153 −132 code/compare/compare.c
+120 −11 code/compare/compare.h
+27 −22 code/fft/fft.c
+0 −4 code/fft/fft.h
+61 −49 code/filter/filter.c
+2 −1 code/filter/filter.h
+268 −197 code/linalg/linalg.c
+4 −4 code/linalg/linalg.h
+1 −0 code/micropython.mk
+1,349 −757 code/ndarray.c
+614 −66 code/ndarray.h
+771 −0 code/ndarray_operators.c
+166 −0 code/ndarray_operators.h
+24 −7 code/ndarray_properties.h
+716 −412 code/numerical/numerical.c
+500 −81 code/numerical/numerical.h
+91 −42 code/poly/poly.c
+4 −2 code/poly/poly.h
+299 −34 code/ulab.c
+187 −27 code/ulab.h
+403 −65 code/ulab_create.c
+42 −7 code/ulab_create.h
+56 −5 code/user/user.c
+299 −100 code/vector/vectorise.c
+131 −8 code/vector/vectorise.h
+9 −1 docs/manual/Makefile
+91 −0 docs/manual/autoapi/templates/python/module.rst
+223 −0 docs/manual/extract_pyi.py
+35 −0 docs/manual/make.bat
+104 −13 docs/manual/source/conf.py
+24 −3 docs/manual/source/index.rst
+251 −0 docs/manual/source/ulab-approx.rst
+149 −0 docs/manual/source/ulab-compare.rst
+228 −0 docs/manual/source/ulab-fft.rst
+99 −0 docs/manual/source/ulab-filter.rst
+536 −0 docs/manual/source/ulab-intro.rst
+482 −0 docs/manual/source/ulab-linalg.rst
+2,172 −0 docs/manual/source/ulab-ndarray.rst
+665 −0 docs/manual/source/ulab-numerical.rst
+122 −0 docs/manual/source/ulab-poly.rst
+921 −0 docs/manual/source/ulab-programming.rst
+415 −0 docs/manual/source/ulab-vectorise.rst
+0 −4,612 docs/manual/source/ulab.rst
+70 −0 docs/manual/source/ulab/approx/index.rst
+51 −0 docs/manual/source/ulab/compare/index.rst
+40 −0 docs/manual/source/ulab/fft/index.rst
+48 −0 docs/manual/source/ulab/filter/index.rst
+429 −0 docs/manual/source/ulab/index.rst
+72 −0 docs/manual/source/ulab/linalg/index.rst
+84 −0 docs/manual/source/ulab/numerical/index.rst
+25 −0 docs/manual/source/ulab/poly/index.rst
+11 −0 docs/manual/source/ulab/user/index.rst
+167 −0 docs/manual/source/ulab/vector/index.rst
+1 −0 docs/requirements.txt
+0 −4,945 docs/source/ulab.rst
+617 −0 docs/ulab-approx.ipynb
+21 −0 docs/ulab-change-log.md
+469 −0 docs/ulab-compare.ipynb
+551 −0 docs/ulab-convert.ipynb
+610 −0 docs/ulab-fft.ipynb
+430 −0 docs/ulab-filter.ipynb
+765 −0 docs/ulab-intro.ipynb
+947 −0 docs/ulab-linalg.ipynb
+0 −6,246 docs/ulab-manual.ipynb
+1,108 −0 docs/ulab-numerical.ipynb
+454 −0 docs/ulab-poly.ipynb
+806 −0 docs/ulab-programming.ipynb
+776 −0 docs/ulab-vectorise.ipynb
+2 −2 tests/00smoke.py.exp
+11 −11 tests/argminmax.py
+6 −6 tests/cholesky.py.exp
+10 −11 tests/compare.py
+4 −4 tests/constructors.py.exp
+6 −6 tests/linalg.py.exp
+8 −8 tests/operators.py.exp
+12 −14 tests/poly.py
+0 −2 tests/slicing.py
2 changes: 1 addition & 1 deletion extmod/vfs_posix_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ typedef struct _mp_obj_vfs_posix_file_t {
#ifdef MICROPY_CPYTHON_COMPAT
STATIC void check_fd_is_open(const mp_obj_vfs_posix_file_t *o) {
if (o->fd < 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, translate("I/O operation on closed file")));
mp_raise_ValueError(translate("I/O operation on closed file"));
}
}
#else
Expand Down
Loading

0 comments on commit 570353b

Please sign in to comment.