Hi,

Our short example-data:
>>> np.arange(10).reshape(1,5,2)
array([[[0, 1],
        [2, 3],
        [4, 5],
        [6, 7],
        [8, 9]]])
Shape is (1,5,2)

Two possibilies:
>>> data.reshape(5,2)
array([[0, 1],
       [2, 3],
       [4, 5],
       [6, 7],
       [8, 9]])

Or just:
>>> data[0]
array([[0, 1],
       [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
To: python-l...@python.org; scipy-u...@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
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to