Search found 110 matches

by v923z
Thu Oct 31, 2019 10:31 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

Re: ulab, or what you will - numpy on bare metal

Jim, Am I correct in saying that for the reversed case, you simply swap the operands, and call the same function again? Yes, runtime.c will do this when none of the previous options have worked and it would otherwise raise TypeError. It changes the op from FOO to REVERSE_FOO and calls your binary op...
by v923z
Wed Oct 30, 2019 8:54 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

Re: ulab, or what you will - numpy on bare metal

I see this ;libiary has featured on Hackster.io https://www.hackster.io/news/zoltan-voros-ulab-brings-numpy-style-fast-math-to-micropython-in-just-25kb-of-compiled-code-aa52a81cd269?fbclid=IwAR2ESld_uyybmrVrRXXd5CmU5DF27v7eSp79zRYhlfRHImNl99oOo5q-u1I It must have leaked from hackaday.com, or perhap...
by v923z
Wed Oct 30, 2019 6:16 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

Re: ulab, or what you will - numpy on bare metal

What you're describing is exactly what __rfoo__ is for. And this is supported in MicroPython. I think that thread might be out of date (also https://github.com/micropython/micropython/issues/2328) as the reverse binary operators are supported. They're enabled by default in the Unix build via MICROP...
by v923z
Tue Oct 29, 2019 7:15 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

Re: ulab, or what you will - numpy on bare metal

Awesome project. Regarding possible developments, having more of `numpy.linalg` stuff (eig, svd) would be really cool and relevant. eig is already in the master branch. Singular value decomposition, well, I don't know. I mean, I am not against it, but it is not on the top of my list at the moment. ...
by v923z
Sat Oct 19, 2019 2:33 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

Re: ulab, or what you will - numpy on bare metal

Hi all, In the past two weeks, I have implemented a number of features, and made ulab's behaviour more consistent with that of numpy's. This adds a bit of overhead in the size of the firmware, however, I wouldn't consider the difference significant, especially, that some of it comes from new functio...
by v923z
Sat Oct 19, 2019 2:00 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

Re: ulab, or what you will - numpy on bare metal

To settle the confusion over DFT benchmarks I've pushed an update to my repo which includes dftbench.py. This acquires data from an ADC and times a forward transform, timing being from when data acquisition ends to when conversion is complete. On a Pyboard 1.x (which runs at 168MHz) the time is 12....
by v923z
Sat Oct 05, 2019 12:59 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

Re: ulab, or what you will - numpy on bare metal

I was wondering if this could be done by ulab. I wonder how numpy does it? The problem is that the binary operators are evaluated in runtime.c, which calls the relevant implementations for the list, tuple, etc. instances. The example that I showed, [0]*5 works, because the runtime.c function proper...
by v923z
Sat Oct 05, 2019 12:05 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

Re: ulab, or what you will - numpy on bare metal

pythoncoder wrote:
Sat Oct 05, 2019 11:11 am
Would it be possible to trap the exception; if it occurs use the integer to instantiate an object for which you define __mul__ etc?
But I am afraid, all this must happen at the micropython level, and not in ulab. Or have I misunderstood you?
by v923z
Fri Oct 04, 2019 10:26 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

commutative operations

Hi all, I have tried to clean up the code for binary operations, and run into a fundamental problem with commutative operators. Namely, this can be handled import ulab a = ulab.ndarray([1, 2, 3]) a*5 because the evaluation of the product operator begins with a , which is an ndarray , therefore, I ha...
by v923z
Fri Oct 04, 2019 10:05 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

Re: ulab, or what you will - numpy on bare metal

chuckbook wrote:
Fri Oct 04, 2019 9:18 am
Don't get confused about the absolute size of the code. There are a lot of additional features included. I just wanted to demonstrate code size increase for -Os and -O2.
Thanks!