OK, will do that. Can you hold off with the firmware files, then? I will try to merge the changes tonight, but it might be tomorrow.rcolistete wrote: ↑Mon Aug 03, 2020 5:59 pmYeah, error message and warning in the docs.v923z wrote: ↑Mon Aug 03, 2020 5:51 pmOK, so if the length > 65535, we simply bail out with a ValueError? Could be done.rcolistete wrote: ↑Mon Aug 03, 2020 5:45 pmI think it is better (less limitation) to document 'argsort' explaining that it deals with arrays with size up to 65535, due to the internal number types of ulab (uint16 is the maximum integer).
ulab, or what you will - numpy on bare metal
Re: ulab, or what you will - numpy on bare metal
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: ulab, or what you will - numpy on bare metal
Yeah, I was planning some days between firmware releases. I'll try to submmit 'linalg.cross()' and 'linalg.norm()' with more features during this wees.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).
Re: ulab, or what you will - numpy on bare metal
Well, actually I managed to merge this now: https://github.com/v923z/micropython-ulab/pull/165rcolistete wrote: ↑Mon Aug 03, 2020 6:08 pmYeah, I was planning some days between firmware releases. I'll try to submmit 'linalg.cross()' and 'linalg.norm()' with more features during this wees.
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: ulab, or what you will - numpy on bare metal
Some news :
- my new MicroPython Firmwares repository currently have 60 firmware files with ulab (v0.54.0 or v0.54.2) included, for :
* Pyboard Lite v1.0 and Pyboard v1.1;
* Pyboard D SF2 / SF3 / SF6;
* ESP8266;
* ESP32 (with or without PSRAM);
* Pycom boards FiPy / GPy / LoPy v1 / LoPy4 / SiPy / WiPy 2 / WiPy 3;
- Pycom MicroPython firmwares (yeah, I'll announce in Pycom Forum) including :
* 24 firmwares without ulab, in combinations of 6 xxPy boards, Pybytes or not, single/double precision;
* 21 firmwares with ulab, in combinations of 6 xxPy boards, Pybytes or not, single/double precision. 3 LoPy/SiPy/WiPy firmwares with ulab and Pybytes combinations are not possible due to the small firmware partition size of these boards. These firmwares with ulab have 'MICROPY_PY_REVERSE_SPECIAL_METHODS' enabled to allow '1 + np.arange(10)', for example.
Pycom MicroPython firmwares with ulab was not simple at all : some backporting was needed from MicroPython v1.12 to Pycom MicroPython (based in v1.11).
- my new MicroPython Firmwares repository currently have 60 firmware files with ulab (v0.54.0 or v0.54.2) included, for :
* Pyboard Lite v1.0 and Pyboard v1.1;
* Pyboard D SF2 / SF3 / SF6;
* ESP8266;
* ESP32 (with or without PSRAM);
* Pycom boards FiPy / GPy / LoPy v1 / LoPy4 / SiPy / WiPy 2 / WiPy 3;
- Pycom MicroPython firmwares (yeah, I'll announce in Pycom Forum) including :
* 24 firmwares without ulab, in combinations of 6 xxPy boards, Pybytes or not, single/double precision;
* 21 firmwares with ulab, in combinations of 6 xxPy boards, Pybytes or not, single/double precision. 3 LoPy/SiPy/WiPy firmwares with ulab and Pybytes combinations are not possible due to the small firmware partition size of these boards. These firmwares with ulab have 'MICROPY_PY_REVERSE_SPECIAL_METHODS' enabled to allow '1 + np.arange(10)', for example.
Pycom MicroPython firmwares with ulab was not simple at all : some backporting was needed from MicroPython v1.12 to Pycom MicroPython (based in v1.11).
Last edited by rcolistete on Fri Aug 07, 2020 6:14 pm, edited 2 times in total.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).
Re: ulab, or what you will - numpy on bare metal
Thanks! I have updated the link.rcolistete wrote: ↑Fri Aug 07, 2020 3:35 pmSome news :
- my new MicroPython Firmwares repository, where currently there are 60 firmware files with ulab (v0.54.0 or v0.54.2)
Re: ulab, or what you will - numpy on bare metal
ulab Samples is a repository with links, examples, benchmarks, etc, about ulab module, a NumPy-like array manipulation library for MicroPython and CircuitPython.
Most interesting is the ulab FFT benchmark for 1024 points, where you can see many MicroPython and CircuitPython boards compared, with calculations in single precision (SP/FP32) and double precision (DP/FP64) for floating point numbers, when possible (due to availabity of firmware with support for FP32/FP64).
The OpenMV Cam H7 board and OpenMV firmware supporting only single precision (FP32) is the clear winner in FP32 FFT.
While Sipeed MAix BiT with RISC-V 64bit Kendryte K210 is the winner in double precision (FP64) FFT when using the MicroPython for K210 Lobo firmware (supporting only FP64).
Pyboard D SF6 with ARM Cortex-M7 STM32F767VIT has dual precision hardware support (FP64), is 2nd in FP64 FFT and 3rd in FP32 FFT;
Pyboard D SF2 with ARM Cortex-M7 STM32F722IEK and only FP32 hardware support, it is in 4th place and almost the same performance as Pyboard D SF6 in FP32 FFT, and in 3rd place in FP64 FFT;
See more comments in ulab Samples repository.
Most interesting is the ulab FFT benchmark for 1024 points, where you can see many MicroPython and CircuitPython boards compared, with calculations in single precision (SP/FP32) and double precision (DP/FP64) for floating point numbers, when possible (due to availabity of firmware with support for FP32/FP64).
The OpenMV Cam H7 board and OpenMV firmware supporting only single precision (FP32) is the clear winner in FP32 FFT.
While Sipeed MAix BiT with RISC-V 64bit Kendryte K210 is the winner in double precision (FP64) FFT when using the MicroPython for K210 Lobo firmware (supporting only FP64).
Pyboard D SF6 with ARM Cortex-M7 STM32F767VIT has dual precision hardware support (FP64), is 2nd in FP64 FFT and 3rd in FP32 FFT;
Pyboard D SF2 with ARM Cortex-M7 STM32F722IEK and only FP32 hardware support, it is in 4th place and almost the same performance as Pyboard D SF6 in FP32 FFT, and in 3rd place in FP64 FFT;
See more comments in ulab Samples repository.
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: ulab, or what you will - numpy on bare metal
Some teasing :
Code: Select all
MicroPython v1.12-670-gf55324882 on 2020-08-17; micro:bit with NRF51822
Type "help()" for more information.
import gc
gc.collect()
gc.mem_free()
10416
1/3
0.3333333
import ulab as np
np.__version__
'0.54.2'
np.
__class__ __name__ __version__ approx
arange array compare eye
fft filter float get_printoptions
int16 int8 linalg linspace
numerical ones poly set_printoptions
uint16 uint8 user vector
zeros
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).
Re: ulab, or what you will - numpy on bare metal
Hi, i am looking for a way to make a hilbert transform in micropython.
Is it normally a part of scipy module.
Is it possible to do that in micropython ?
Best
Is it normally a part of scipy module.
Is it possible to do that in micropython ?
Best
Re: ulab, or what you will - numpy on bare metal
In order to get the Hilbert transform, do you need anything beyond a combination of the Fourier and inverse Fourier transforms, and standard array operations?
If you think a feature is missing, you would have better luck raising an issue here https://github.com/v923z/micropython-ulab/issues