[Numpy-discussion] Can't mix np.newaxis with boolean indexing
Sun Aug 21 15:39:02 CDT 2011
On Sunday, August 21, 2011, Torgil Svensson <firstname.lastname@example.org>
> Since the result is one-dimensional after using boolean indexing you
> can always do:
> a[b][:, np.newaxis]
> a[b][np.newaxis, :]
> array([[2, 3, 4]])
Correct, which I already noted as a workaround in my first email. The point
I am making is that that shouldn't be necessary because of generic
programming concepts, or a better error message should be emitted in case a
developer didn't know that he was doing Boolean indexing.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion