Re: [Numpy-discussion] using scalar input on np.PyArray_MultiIterNew2

2021-01-10 Thread zoj613
Sebastian Berg wrote > On Sun, 2021-01-10 at 09:59 -0700, zoj613 wrote: >> Hi all, >> >> I am looking for a way to use `np.PyArray_MultiIterNew2` in Cython to >> broadcast parameters of a function. The requirement is that the two >> arguments can be scalar and/or sequences. Using the usual >> `n

Re: [Numpy-discussion] using scalar input on np.PyArray_MultiIterNew2

2021-01-10 Thread Sebastian Berg
On Sun, 2021-01-10 at 09:59 -0700, zoj613 wrote: > Hi all, > > I am looking for a way to use `np.PyArray_MultiIterNew2` in Cython to > broadcast parameters of a function. The requirement is that the two > arguments can be scalar and/or sequences. Using the usual > `np.broadcast` > function works w

[Numpy-discussion] using scalar input on np.PyArray_MultiIterNew2

2021-01-10 Thread zoj613
Hi all, I am looking for a way to use `np.PyArray_MultiIterNew2` in Cython to broadcast parameters of a function. The requirement is that the two arguments can be scalar and/or sequences. Using the usual `np.broadcast` function works well but is slow when iterating over the broadcasted input in a