[Numpy-discussion] .T Transpose shortcut for arrays again
David M. Cooke
cookedm at physics.mcmaster.ca
Fri Jul 7 16:22:20 EDT 2006
On Fri, 7 Jul 2006 15:26:41 +0100
"George Nurser" <gnurser at googlemail.com> wrote:
> On 07/07/06, Robert Hetland <rhetland at mac.com> wrote:
> [snip]
> > However, I use transpose often when not dealing with linear algebra, in
> > particular with reading in data, and putting various columns into
> > variables. Also, occasional in plotting (which expects things in
> > 'backward' order relative to x-y space), and communicating between
> > fortran programs (which typically use 'forward' order (x, y, z)) and
> > numpy (backward -- (z, x, y)).
> >
> This is my usage as well. Also my primitive knowledge of numpy
> requires use of the transpose when iterating over indexes from where.
> Moreover I think the notation .T is perfectly reasonable. So I agree
> with:
same.
>
> > I am very much in favor of .T, but it should be a full .transpose(), not
> > just swap the last two axes. I don't care so much for the others.
>
> +1 for .T == .transpose()
Another +1 from me. If transpose was a shorter word I wouldn't care :-)
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca
More information about the NumPy-Discussion
mailing list