Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #105541
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Simon Ward <simon+python@bleah.co.uk> |
| Newsgroups | comp.lang.python |
| Subject | Re: numpy arrays |
| Date | Wed, 23 Mar 2016 10:47:47 +0000 |
| Lines | 25 |
| Message-ID | <mailman.49.1458732240.2244.python-list@python.org> (permalink) |
| References | <3774dc9b-f9d3-462b-bbe4-41b8b2244db7@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de jBmQt3rUuU5+cdAOjSzqQwIxZWytEUbmlpNvbe4bzAkA== |
| Return-Path | <simon+python@bleah.co.uk> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.135 |
| X-Spam-Level | * |
| X-Spam-Evidence | '*H*': 0.75; '*S*': 0.02; 'method:': 0.09; '2016': 0.16; 'numpy': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'to:2**1': 0.21; 'this:': 0.23; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'array': 0.29; 'convert': 0.29; 'there': 0.36; 'url:org': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'to:addr:python.org': 0.40; 'received:uk': 0.61; 'url:0': 0.63; 'march': 0.64; 'mail.': 0.75; 'url:10': 0.79; 'url:scipy': 0.84; 'url:reference': 0.91 |
| User-Agent | Kaiten Mail |
| In-Reply-To | <3774dc9b-f9d3-462b-bbe4-41b8b2244db7@googlegroups.com> |
| X-Spam-Flag | NO |
| X-Spam-Score | -2.9 |
| X-Spam-Level | -- |
| X-Spam-Report | No, score=-2.9 required=5.0 tests=ALL_TRUSTED, BAYES_00 autolearn=ham version=3.3.2 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:105541 |
Show key headers only | View raw
On 23 March 2016 10:06:56 GMT+00:00, Heli <hemla21@gmail.com> wrote: >Hi, > >I have a 2D numpy array like this: > >[[1,2,3,4], > [1,2,3,4], > [1,2,3,4] > [1,2,3,4]] > >Is there any fast way to convert this array to > >[[1,1,1,1], > [2,2,2,2] > [3,3,3,3] > [4,4,4,4]] Use the transpose() method: http://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.ndarray.transpose.html Simon -- Sent from Kaiten Mail. Please excuse my brevity.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
numpy arrays Heli <hemla21@gmail.com> - 2016-03-23 03:06 -0700
Re: numpy arrays Steven D'Aprano <steve@pearwood.info> - 2016-03-23 21:32 +1100
Re: numpy arrays Chris Angelico <rosuav@gmail.com> - 2016-03-23 21:35 +1100
Re: numpy arrays Nobody <nobody@nowhere.invalid> - 2016-03-23 13:45 +0000
Re: numpy arrays Heli <hemla21@gmail.com> - 2016-04-06 09:26 -0700
Re: numpy arrays Heli <hemla21@gmail.com> - 2016-04-07 07:31 -0700
Re: numpy arrays Heli <hemla21@gmail.com> - 2016-04-11 02:17 -0700
Re: numpy arrays Heli <hemla21@gmail.com> - 2016-04-11 02:32 -0700
Re: numpy arrays Manolo MartÃnez <manolo@austrohungaro.com> - 2016-03-23 11:26 +0100
Re: numpy arrays Heli <hemla21@gmail.com> - 2016-03-23 03:47 -0700
Re: numpy arrays Simon Ward <simon+python@bleah.co.uk> - 2016-03-23 10:47 +0000
csiph-web