Re: [Numpy-discussion] Convert 3d NumPy array into 2d

2014-08-27 Thread Sebastian Berg
On Do, 2014-08-28 at 00:08 +0900, phinn stuart wrote: > Hi everyone, how can I convert (1L, 480L, 1440L) shaped numpy array > into (480L, 1440L)? > Just slice it arr[0, ...] will do the trick. If you are daring, np.squeeze also works, or of course np.reshape. - Sebastian > > Thanks in the adva

Re: [Numpy-discussion] Convert 3d NumPy array into 2d

2014-08-27 Thread Julian Taylor
On 27.08.2014 17:08, phinn stuart wrote: > Hi everyone, how can I convert (1L, 480L, 1440L) shaped numpy array into > (480L, 1440L)? > > Thanks in the advance. np.squeeze removes empty dimensions: In [2]: np.squeeze(np.ones((1,23,232))).shape Out[2]: (23, 232) __

Re: [Numpy-discussion] Convert 3d NumPy array into 2d

2014-08-27 Thread Benjamin Root
], > >[2, 3], > >[4, 5], > >[6, 7], > >[8, 9]]) > > > > > > *From:* numpy-discussion-boun...@scipy.org [mailto: > numpy-discussion-boun...@scipy.org] *On Behalf Of *phinn stuart > *Sent:* Mittwoch, 27. August 2014 17:09

Re: [Numpy-discussion] Convert 3d NumPy array into 2d

2014-08-27 Thread Wagner Sebastian
scipy.org; numpy-discussion@scipy.org Subject: [Numpy-discussion] Convert 3d NumPy array into 2d Hi everyone, how can I convert (1L, 480L, 1440L) shaped numpy array into (480L, 1440L)? Thanks in the advance. phinn ___ NumPy-Discussion mailing list NumP

[Numpy-discussion] Convert 3d NumPy array into 2d

2014-08-27 Thread phinn stuart
Hi everyone, how can I convert (1L, 480L, 1440L) shaped numpy array into (480L, 1440L)? Thanks in the advance. phinn ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion