Thanks Hameer for the suggestion. I perhaps should have clarified that this is
a small example for something larger, where I am iterating over a sequence of
arrays, computing some reduction on the first and writing to the second. I am
hoping to keep it all contained within one nditer.
Thanks
On Tue, 2020-05-19 at 17:11 +0100, Eric Wieser wrote:
> Hi Will,
>
> To force an iteration to run along certain axes, I believe you should
> be
> using `op_axes`. Your diagnosis is correct that `external_loop` is
> trying
> to help you be more optimal, since it's purpose is exactly that:
>
Hi Will,
To force an iteration to run along certain axes, I believe you should be
using `op_axes`. Your diagnosis is correct that `external_loop` is trying
to help you be more optimal, since it's purpose is exactly that:
optimization.
Unfortunately, if you use `op_axes` you'll run into
n.org"
Subject: Re: [Numpy-discussion] Using nditer + external_loop to Always Iterate
by Column
I am trying to use the nditer to traverse each column of a 2D array, returning
the column as a 1D array. Consulting the docs, I found this example which works
perfectly fine:
In [65]: a = np.arange(
I am trying to use the nditer to traverse each column of a 2D array, returning
the column as a 1D array. Consulting the docs, I found this example which works
perfectly fine:
In [65]: a = np.arange(6).reshape(2,3)