diff --git a/extmod/ulab b/extmod/ulab index 1d3ddd8f522..ec98536e27f 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit 1d3ddd8f5228e2c7335dac71f4846e6abb0ec9f9 +Subproject commit ec98536e27fe9b91f00478abef6fc950bebf524a diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index bc0286dfe61..1ecb590f02f 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -100,6 +100,10 @@ msgstr "" msgid "ndarray length overflows" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "maximum number of dimensions is " +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "cannot convert complex type" msgstr "" @@ -154,11 +158,23 @@ msgid "operation is not supported for given type" msgstr "" #: extmod/ulab/code/ndarray.c -msgid "shape must be integer or tuple of integers" +msgid "keyword argument must be tuple of integers" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/random/random.c -msgid "maximum number of dimensions is " +#: extmod/ulab/code/ndarray.c +msgid "too many axes specified" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "axis index out of bounds" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "repeated indices" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "shape must be integer or tuple of integers" msgstr "" #: extmod/ulab/code/ndarray.c @@ -225,6 +241,31 @@ msgstr "" msgid "not implemented for complex dtype" msgstr "" +#: extmod/ulab/code/numpy/compare.c extmod/ulab/code/user/user.c +#: shared-bindings/_eve/__init__.c +msgid "input must be an ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/compare.c +msgid "object too deep for desired array" +msgstr "" + +#: extmod/ulab/code/numpy/compare.c +msgid "cannot cast array data from dtype" +msgstr "" + +#: extmod/ulab/code/numpy/compare.c +msgid "minlength must not be negative" +msgstr "" + +#: extmod/ulab/code/numpy/compare.c +msgid "the weights and list don't have the same length" +msgstr "" + +#: extmod/ulab/code/numpy/compare.c +msgid "cannot cast weigths to float" +msgstr "" + #: extmod/ulab/code/numpy/compare.c extmod/ulab/code/numpy/create.c #: extmod/ulab/code/numpy/io/io.c extmod/ulab/code/numpy/transform.c #: extmod/ulab/code/numpy/vector.c @@ -259,7 +300,7 @@ msgstr "" msgid "wrong axis specified" msgstr "" -#: extmod/ulab/code/numpy/create.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "input arrays are not compatible" msgstr "" @@ -271,6 +312,45 @@ msgstr "" msgid "number of points must be at least 2" msgstr "" +#: extmod/ulab/code/numpy/create.c +msgid "indexing should be 'xy' or 'ij'" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "indexing must be 'xy' or 'ij'" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "too many input arrays" +msgstr "" + +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/numpy/transform.c +msgid "arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "arguments must be 1D arrays" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "input is not an array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/numpy/numerical.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: shared-bindings/bitmaptools/__init__.c +msgid "index out of range" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "mode should be raise, wrap or clip" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "index must not be negative" +msgstr "" + #: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -291,7 +371,7 @@ msgstr "" msgid "FFT is implemented for linear arrays only" msgstr "" -#: extmod/ulab/code/numpy/fft/fft_tools.c +#: extmod/ulab/code/numpy/fft/fft_tools.c extmod/ulab/code/utils/utils.c msgid "input array length must be power of 2" msgstr "" @@ -400,10 +480,6 @@ msgstr "" msgid "axis too long" msgstr "" -#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/numpy/transform.c -msgid "arguments must be ndarrays" -msgstr "" - #: extmod/ulab/code/numpy/numerical.c msgid "cross is defined for 1D arrays of length 3" msgstr "" @@ -412,12 +488,6 @@ msgstr "" msgid "diff argument must be an ndarray" msgstr "" -#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/espressif/common-hal/pulseio/PulseIn.c -#: shared-bindings/bitmaptools/__init__.c -msgid "index out of range" -msgstr "" - #: extmod/ulab/code/numpy/numerical.c msgid "differentiation order out of range" msgstr "" @@ -463,10 +533,10 @@ msgid "argument must be None, an integer or a tuple of integers" msgstr "" #: extmod/ulab/code/numpy/random/random.c -msgid "shape must be None, and integer or a tuple of integers" +msgid "shape must be None, an integer or a tuple of integers" msgstr "" -#: extmod/ulab/code/numpy/random/random.c +#: extmod/ulab/code/numpy/random/random.c extmod/ulab/code/ulab_tools.c msgid "out has wrong type" msgstr "" @@ -478,7 +548,7 @@ msgstr "" msgid "size must match out.shape when used together" msgstr "" -#: extmod/ulab/code/numpy/random/random.c +#: extmod/ulab/code/numpy/random/random.c extmod/ulab/code/ulab_tools.c msgid "output array must be contiguous" msgstr "" @@ -502,7 +572,7 @@ msgstr "" msgid "dimensions do not match" msgstr "" -#: extmod/ulab/code/numpy/vector.c +#: extmod/ulab/code/numpy/vector.c extmod/ulab/code/utils/utils.c msgid "out must be an ndarray" msgstr "" @@ -538,7 +608,7 @@ msgstr "" msgid "input dtype must be float or complex" msgstr "" -#: extmod/ulab/code/numpy/vector.c +#: extmod/ulab/code/numpy/vector.c extmod/ulab/code/scipy/integrate/integrate.c msgid "first argument must be a callable" msgstr "" @@ -546,18 +616,36 @@ msgstr "" msgid "wrong output type" msgstr "" -#: extmod/ulab/code/scipy/linalg/linalg.c -msgid "first two arguments must be ndarrays" +#: extmod/ulab/code/scipy/integrate/integrate.c +#, c-format +msgid "can't convert arg %d from %s to float" msgstr "" -#: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c -msgid "input must be a dense ndarray" +#: extmod/ulab/code/scipy/integrate/integrate.c +msgid "levels needs to be a positive integer" msgstr "" +#: extmod/ulab/code/scipy/integrate/integrate.c +msgid "steps needs to be a positive integer" +msgstr "" + +#: extmod/ulab/code/scipy/integrate/integrate.c #: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" msgstr "" +#: extmod/ulab/code/scipy/integrate/integrate.c +msgid "order needs to be a positive integer" +msgstr "" + +#: extmod/ulab/code/scipy/linalg/linalg.c +msgid "first two arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c +msgid "input must be a dense ndarray" +msgstr "" + #: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" msgstr "" @@ -622,8 +710,16 @@ msgstr "" msgid "input must be square matrix" msgstr "" -#: extmod/ulab/code/user/user.c shared-bindings/_eve/__init__.c -msgid "input must be an ndarray" +#: extmod/ulab/code/ulab_tools.c +msgid "out array has wrong dtype" +msgstr "" + +#: extmod/ulab/code/ulab_tools.c +msgid "out array has wrong dimension" +msgstr "" + +#: extmod/ulab/code/ulab_tools.c +msgid "out array has wrong shape" msgstr "" #: extmod/ulab/code/utils/utils.c @@ -638,6 +734,34 @@ msgstr "" msgid "out array is too small" msgstr "" +#: extmod/ulab/code/utils/utils.c +msgid "spectrogram is defined for ndarrays only" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "spectrogram is implemented for 1D arrays only" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out array must be a 1D array of float type" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "input and out arrays must have same length" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "scratchpad must be an ndarray" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "scratchpad must be a 1D dense float array" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "scratchpad must be twice as long as input" +msgstr "" + #: extmod/vfs_fat.c py/moderrno.c msgid "Read-only filesystem" msgstr "" diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 381cb9538e4..6fa6552e415 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -410,9 +410,23 @@ extern const struct _mp_obj_module_t nvm_module; #define ULAB_SUPPORTS_COMPLEX (0) #endif -// The random module is fairly large. -#ifndef ULAB_NUMPY_HAS_RANDOM_MODULE -#define ULAB_NUMPY_HAS_RANDOM_MODULE (0) +// TEMPORARY TO SEE WHAT OVERFLOWS +// // Disable some ulab modules to make it fit on SAMD51x19 boards +// // Consider turning on these modules on boards with more flash. + +// #ifndef ULAB_NUMPY_HAS_RANDOM_MODULE +// #define ULAB_NUMPY_HAS_RANDOM_MODULE (0) +// #endif + +// #ifndef NDARRAY_HAS_BINARY_OP_MODULO +// #define NDARRAY_HAS_BINARY_OP_MODULO (0) +// #endif +// #ifndef NDARRAY_HAS_INPLACE_MODULO +// #define NDARRAY_HAS_INPLACE_MODULO (0) +// #endif + +#ifndef ULAB_SCIPY_HAS_INTEGRATE_MODULE +#define ULAB_SCIPY_HAS_INTEGRATE_MODULE (0) #endif #if CIRCUITPY_ULAB