as title. I am a newer of micropython, and I want to use scipy and numpy in pyboard. what can I do then?
thanks in advance.
Thanks for your reply. Now I have to code my own array/fft/fir and so on. They are the keys of my job.
Thanks again.
mhwang1973 wrote:
Thanks for your reply. Now I have to code my own array/fft/fir and so on. They are the keys of my job.
Thanks again.
MicropPython supports the array module. You might also like to look at my attempts at FFT
https://github.com/peterhinch/micropython-fourier.git
and FIR
https://github.com/peterhinch/micropython-filters.git
. They don't aim to compete with the big libraries - their aim is fast execution on the Pyboard.
FFT is so important for signal processing and many other usages, also ESP32 has ADC and DAC.
It will be very nice if FFT is built into MicroPython.
From initial tests the ESP32 ADC and DAC aren't as accurate as those on the Pyboard.
As a general point re FFT, a DFT routine in Python will be portable and examples abound on the web. To sate the obvious it may not be fast enough for realtime DSP even if you use the high performance code emitters. The solution is to use assembler. My Arm Thumb attempt is fairly fast, but could undoubtedly be optimised further, perhaps by up to a factor of two.
I doubt that the MicroPython maintainers will write an optimised DFT in assembler for each target arch. It's up to us, the users, to do this; it's more grunt-work than rocket science
Likewise FIR and IIR filters benefit hugely from asm.
I have no particular ambition to use an ESP32 for DSP.