[Numpy-discussion] numpy grant update

Marten van Kerkwijk m.h.vankerkwijk at gmail.com
Thu Oct 26 22:16:59 EDT 2017


Hi Nathaniel,

That sounds like it could work very well indeed!

Somewhat related only, for the inner loops I've been thinking whether
it might be possible to automatically create composite ufuncs, where
the inner loops are executed in some prescribed order, so that for
instance one could define
```
sinmul = sin(multiply(Input(1), Input(2)))
```
which would then create a new ufunc with 2 inputs and one output,
which would internally first multiply the inputs and the take the sin
(you'll see some similarity with an example in the talk you gave...).
For this purpose, I'm thinking one could just reuse the iterator, but
call the inner loops sequentially (being somewhat smart in that the
sin can be done in-place on the output of the multiply).

I could see that even complicated "casting" from dtypes could be
implemented similarly (it probably already happens for
int/float/etc.?)

Anyway, looking forward to hearing more (in due time)!

All the best,

Marten


More information about the NumPy-Discussion mailing list