[Numpy-discussion] nested_iters does not accept length zero nest (also doesn't have documentation)
Tue Jan 3 11:49:48 CST 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)], [, ])
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...
More information about the NumPy-Discussion