Re: [Numpy-discussion] Reordering indices

2014-05-30 Thread Jaime Fernández del Río
On Fri, May 30, 2014 at 8:48 AM, Bob Dowling wrote: > Is there a clean way to create a view on an existing ND-array with its > axes in a different order. > > There's an epidemic of axes reordering, the exact same thing was asked yesterday in StackOverflow: http://stackoverflow.com/questions/2394

Re: [Numpy-discussion] Reordering indices

2014-05-30 Thread Robert Kern
On Fri, May 30, 2014 at 4:55 PM, Bob Dowling wrote: >> http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.transpose.html > > And I completely missed its general case. D'oh! Don't feel bad; it's not often discussed, and has a name derived from its rank-2 special case. :-) -- Robe

Re: [Numpy-discussion] Reordering indices

2014-05-30 Thread Bob Dowling
> http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.transpose.html And I completely missed its general case. D'oh! Thank you. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-disc

Re: [Numpy-discussion] Reordering indices

2014-05-30 Thread Robert Kern
On Fri, May 30, 2014 at 4:48 PM, Bob Dowling wrote: > Is there a clean way to create a view on an existing ND-array with its > axes in a different order. > > For example, suppose I have an array of shape (100,200,300,3) and I > want to create a view of this where the vector coordinate is axis 0,

[Numpy-discussion] Reordering indices

2014-05-30 Thread Bob Dowling
Is there a clean way to create a view on an existing ND-array with its axes in a different order. For example, suppose I have an array of shape (100,200,300,3) and I want to create a view of this where the vector coordinate is axis 0, not axis 3. (So the view will have shape (3,100,200,300).)