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
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)
__
],
>
>[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
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
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