On Sunday, August 21, 2011, Torgil Svensson <torgil.svens...@gmail.com> wrote: > Since the result is one-dimensional after using boolean indexing you > can always do: > > a[b][:, np.newaxis] > array([[2], > [3], > [4]]) > > a[b][np.newaxis, :] > array([[2, 3, 4]]) > > //Torgil
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. Ben Root
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion