[Numpy-discussion] using scalar and tuple/list input on np.PyArray_MultiIterNew2

zoj613 blkzol001 at myuct.ac.za
Mon Jan 11 18:06:16 EST 2021


No, The function is what I ended up with, I just forgot to change (h, z) to
(a, b). It works fine. Yes, I want to ensure that I end up with a double
type even if an integer value is passed. I didn't think of unconditionally
using np.PyArray_From_OT() even for scalars. I guess that is probably a
better approach instead of the if statements because ultimately for that
code block I want a broacasted array as a result, not scalars.  I will
experiment with the new multi-iterator interface and see if it is better
than the current approach. Thanks!



--
Sent from: http://numpy-discussion.10968.n7.nabble.com/


More information about the NumPy-Discussion mailing list