Open
Description
When iterating using C, all that's returned is a pointer to the start of the array, and it's the users job to index it with their own memory of its strides and dimensions (like what happens in the gufunc inner loops).
However, the python nditer[i]
API always returns 0d arrays, and does not produce a view over the axes that were removed.
My feeling is that this:
a = np.array([[1, 2], [3, 4]])
b = np.array([[10, 20], [30, 40]])
it = np.nditer((a, b), op_axes=[[0], [0]])
while not it.finished:
print(i.value)
it.iternext()
should output
(array([1, 2]), array([10, 20]))
(array([3, 4]), array([30, 40]))
whereas it outputs at the moment
(array(1), array(10))
(array(3), array(30))
Can someone with a better understanding of NdIter
confirm that my intuition is correct here?
Metadata
Metadata
Assignees
Labels
No labels