Re: [Numpy-discussion] Multi-dimensional array of splitted array

2016-03-23 Thread Ibrahim EL MEREHBI
Thanks Eric. I already checked that. It's not what I want. I think I wasn't clear about what I wanted. I want to split each column but I want to do it for each column and end up with an array. Here's the result I wish to have: array([[[0], [1, 2, 3, 4], [5, 6, 7], [8, 9]], [[10], [11,

Re: [Numpy-discussion] Multi-dimensional array of splitted array

2016-03-23 Thread Joseph Fox-Rabinovitz
On Wed, Mar 23, 2016 at 9:37 AM, Ibrahim EL MEREHBI wrote: > Thanks Eric. I already checked that. It's not what I want. I think I wasn't > clear about what I wanted. > > I want to split each column but I want to do it for each column and end up > with an array. Here's the

Re: [Numpy-discussion] Multi-dimensional array of splitted array

2016-03-23 Thread Eric Moore
Try just calling np.array_split on the full 2D array. It splits along a particular axis, which is selected using the axis argument of np.array_split. The axis to split along defaults to the first so the two calls to np.array_split below are exactly equivalent. In [16]: a =

[Numpy-discussion] Multi-dimensional array of splitted array

2016-03-23 Thread Ibrahim EL MEREHBI
Hello, I have a multi-diensional array that I would like to split its columns. For example consider, dat = np.array([np.arange(10),np.arange(10,20), np.arange(20,30)]).T array([[ 0, 10, 20], [ 1, 11, 21], [ 2, 12, 22], [ 3, 13, 23], [ 4, 14, 24], [ 5, 15,

Re: [Numpy-discussion] Multi-dimensional array of splitted array

2016-03-23 Thread Sebastian Berg
On Mi, 2016-03-23 at 10:02 -0400, Joseph Fox-Rabinovitz wrote: > On Wed, Mar 23, 2016 at 9:37 AM, Ibrahim EL MEREHBI > wrote: > > Thanks Eric. I already checked that. It's not what I want. I think > > I wasn't > > clear about what I wanted. > > > > I want to split each

Re: [Numpy-discussion] Multi-dimensional array of splitted array

2016-03-23 Thread Ibrahim EL MEREHBI
As an object, will it change how numpy operates? Sincerely Yours, Bob On 23/03/2016 15:22, Sebastian Berg wrote: On Mi, 2016-03-23 at 10:02 -0400, Joseph Fox-Rabinovitz wrote: On Wed, Mar 23, 2016 at 9:37 AM, Ibrahim EL MEREHBI wrote: Thanks Eric. I already checked

Re: [Numpy-discussion] Multi-dimensional array of splitted array

2016-03-23 Thread Sebastian Berg
On Mi, 2016-03-23 at 10:02 -0400, Joseph Fox-Rabinovitz wrote: > On Wed, Mar 23, 2016 at 9:37 AM, Ibrahim EL MEREHBI > wrote: > > Thanks Eric. I already checked that. It's not what I want. I think > > I wasn't > > clear about what I wanted. > > > > I want to split each