micropython-ulab/code/numpy
Jeff Epler 308627c9aa
Fix several build errors in CircuitPython (#533)
* Properly register submodules of ulab

This is related to
 * https://github.com/adafruit/circuitpython/issues/6066

in which, after the merge of 1.18 into CircuitPython, we lost the ability
to import submodules of built-in modules.

While reconstructing the changes we had made locally to enable this,
I discovered that there was an easier way: simply register the dotted
module names via MP_REGISTER_MODULE.

* Fix finding processor count when no `python` executable is installed

debian likes to install only `python3`, and not `python` (which was,
for many decades, python2).

This was previously done for `build.sh` but not for `build-cp.sh`.

* Only use this submodule feature in CircuitPython

.. as it does not work properly in MicroPython.

Also, modules to be const. This saves a small amount of RAM

* Fix -Werror=undef diagnostic

Most CircuitPython ports build with -Werror=undef, so that use of an
undefined preprocessor flag is an error. Also, CircuitPython's micropython
version is old enough that MICROPY_VERSION is not (ever) defined.

Defensively check for this macro being defined, and use the older style
of MP_REGISTER_MODULE when it is not.

* Fix -Werror=discarded-qualifiers diagnostics

Most CircuitPython ports build with -Werror=discarded-qualifiers.
This detected a problem where string constants were passed to functions
with non-constant parameter types.

* bump version number

* Use MicroPython-compatible registration of submodules

* straggler

* Remove spurious casts

these were build errors for micropython

* Run tests for both nanbox and regular variant during CI
2022-07-07 20:17:49 +02:00
..
carray implement ==, and != for complex dtypes 2022-01-07 14:05:38 +01:00
fft Fix several build errors in CircuitPython (#533) 2022-07-07 20:17:49 +02:00
io Fix several build errors in CircuitPython (#533) 2022-07-07 20:17:49 +02:00
linalg Fix several build errors in CircuitPython (#533) 2022-07-07 20:17:49 +02:00
ndarray Fix build for MICROPY_OBJ_REPR_D configurations (#531) 2022-07-06 20:38:20 +02:00
approx.c Fix build for MICROPY_OBJ_REPR_D configurations (#531) 2022-07-06 20:38:20 +02:00
approx.h re-arrange files, so that circuitpython docs can be generated 2021-07-14 23:15:19 +02:00
compare.c Fix build for MICROPY_OBJ_REPR_D configurations (#531) 2022-07-06 20:38:20 +02:00
compare.h re-arrange files, so that circuitpython docs can be generated 2021-07-14 23:15:19 +02:00
create.c Fix build for MICROPY_OBJ_REPR_D configurations (#531) 2022-07-06 20:38:20 +02:00
create.h add asarray, and tests for asarray and size 2022-01-14 20:45:14 +01:00
filter.c Fix build for MICROPY_OBJ_REPR_D configurations (#531) 2022-07-06 20:38:20 +02:00
filter.h re-arrange files, so that circuitpython docs can be generated 2021-07-14 23:15:19 +02:00
numerical.c Fix build for MICROPY_OBJ_REPR_D configurations (#531) 2022-07-06 20:38:20 +02:00
numerical.h fix sorting on empty arrays 2022-04-18 10:18:19 +02:00
numpy.c Fix several build errors in CircuitPython (#533) 2022-07-07 20:17:49 +02:00
numpy.h Fix several build errors in CircuitPython (#533) 2022-07-07 20:17:49 +02:00
poly.c fix macro call in poly.c 2021-12-03 08:59:23 +01:00
poly.h re-arrange files, so that circuitpython docs can be generated 2021-07-14 23:15:19 +02:00
stats.c ulab can now be compiled with complex support 2021-12-03 08:59:23 +01:00
stats.h re-arrange files, so that circuitpython docs can be generated 2021-07-14 23:15:19 +02:00
transform.c Fix build for MICROPY_OBJ_REPR_D configurations (#531) 2022-07-06 20:38:20 +02:00
transform.h add numpy.size 2022-01-14 19:57:18 +01:00
vector.c Fix build for MICROPY_OBJ_REPR_D configurations (#531) 2022-07-06 20:38:20 +02:00
vector.h implement sqrt for complex arrays 2021-12-07 19:55:15 +01:00