Re: [Numpy-discussion] reshaping array question

2015-11-17 Thread Robert Kern
On Nov 17, 2015 6:53 PM, "Sebastian Berg" wrote: > > On Di, 2015-11-17 at 13:49 -0500, Neal Becker wrote: > > Robert Kern wrote: > > > > > On Tue, Nov 17, 2015 at 3:48 PM, Neal Becker wrote: > > >> > > >> I have an array of shape > > >> (7, 24, 2, 1024) > > >> > > >> I'd like an array of > > >> (

Re: [Numpy-discussion] reshaping array question

2015-11-17 Thread Sebastian Berg
On Di, 2015-11-17 at 13:49 -0500, Neal Becker wrote: > Robert Kern wrote: > > > On Tue, Nov 17, 2015 at 3:48 PM, Neal Becker wrote: > >> > >> I have an array of shape > >> (7, 24, 2, 1024) > >> > >> I'd like an array of > >> (7, 24, 2048) > >> > >> such that the elements on the last dimension are

Re: [Numpy-discussion] reshaping array question

2015-11-17 Thread Neal Becker
Robert Kern wrote: > On Tue, Nov 17, 2015 at 3:48 PM, Neal Becker wrote: >> >> I have an array of shape >> (7, 24, 2, 1024) >> >> I'd like an array of >> (7, 24, 2048) >> >> such that the elements on the last dimension are interleaving the >> elements from the 3rd dimension >> >> [0,0,0,0] -> [0,

Re: [Numpy-discussion] reshaping array question

2015-11-17 Thread Sebastian Berg
On Di, 2015-11-17 at 10:48 -0500, Neal Becker wrote: > I have an array of shape > (7, 24, 2, 1024) > > I'd like an array of > (7, 24, 2048) > > such that the elements on the last dimension are interleaving the elements > from the 3rd dimension > Which basically means you want to reshape with t

Re: [Numpy-discussion] reshaping array question

2015-11-17 Thread Robert Kern
On Tue, Nov 17, 2015 at 3:48 PM, Neal Becker wrote: > > I have an array of shape > (7, 24, 2, 1024) > > I'd like an array of > (7, 24, 2048) > > such that the elements on the last dimension are interleaving the elements > from the 3rd dimension > > [0,0,0,0] -> [0,0,0] > [0,0,1,0] -> [0,0,1] > [0,

[Numpy-discussion] reshaping array question

2015-11-17 Thread Neal Becker
I have an array of shape (7, 24, 2, 1024) I'd like an array of (7, 24, 2048) such that the elements on the last dimension are interleaving the elements from the 3rd dimension [0,0,0,0] -> [0,0,0] [0,0,1,0] -> [0,0,1] [0,0,0,1] -> [0,0,2] [0,0,1,1] -> [0,0,3] ... What might be the simplest way