On Tue, Feb 7, 2012 at 9:01 PM, Travis Oliphant <tra...@continuum.io> wrote: > like so: x[ind1, :, ind2], the question is what should the shape of the > output me. If ind1 is a scalar there is no ambiguity (and this should be > special cased --- but unfortunately isn't).
If x.shape == (a0, a1, a2) ind1.shape == (b0, 1, 1) ind2.shape == (1, 1, b1) then an expected output shape for x[ind1, :, ind2] could be (b0, a1, b1). At the moment it is (b0, 1, b1, a1). The logic would be fairly straightforward, something akin to: out_shape = list(np.broadcast_arrays(ind1, ind2)[0].shape) out_shape[colon_positions] = x.shape[colon_positions] Stéfan _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion