[Numpy-discussion] nested_iters does not accept length zero nest (also doesn't have documentation)
John Salvatier
jsalvati at u.washington.edu
Tue Jan 3 12:49:48 EST 2012
Hellow, while using the nested_iters function, I've noticed that it does
not accept length zero nestings. For example, the following fails:
nested_iters([ones(3),ones(3)], [[], [0]])
with "ValueError: If 'op_axes' or 'itershape' is not NULL in theiterator
constructor, 'oa_ndim' must be greater than zero"
This makes a certain amount of sense to me, but I think having the iterator
with the empty axes have a single iteration would be more useful. For
example, if you are using nested_iters to ally a function along a specific
set of axes, you'll otherwise have to special case the case where those
axes take up the whole array (which is my use case). This is not much of a
hassle for me, but I thought other people might like to know.
Also, I could not find any nested_iters documentation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120103/6d06814d/attachment.html>
More information about the NumPy-Discussion
mailing list