Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77158 > unrolled thread
| Started by | Gary Herron <gary.herron@islandtraining.com> |
|---|---|
| First post | 2014-08-27 12:34 -0700 |
| Last post | 2014-08-27 12:34 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Convert 3d NumPy array into 2d Gary Herron <gary.herron@islandtraining.com> - 2014-08-27 12:34 -0700
| From | Gary Herron <gary.herron@islandtraining.com> |
|---|---|
| Date | 2014-08-27 12:34 -0700 |
| Subject | Re: Convert 3d NumPy array into 2d |
| Message-ID | <mailman.13522.1409168507.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
On 08/27/2014 08:08 AM, phinn stuart wrote: > Hi everyone, how can I convert (1L, 480L, 1440L) shaped numpy array > into (480L, 1440L)? > > Thanks in the advance. > > phinn > > A simple assignment into the arrays shape does it: >>> a = numpy.zeros((1,480,1440)) >>> a.shape (1, 480, 1440) >>> a.shape = (480,1440) >>> a.shape (480, 1440) Gary Herron
Back to top | Article view | comp.lang.python
csiph-web