[Numpy-discussion] ndarray.T2 for 2D transpose
chris.barker at noaa.gov
Fri Apr 8 14:17:42 EDT 2016
On Fri, Apr 8, 2016 at 9:59 AM, Charles R Harris <charlesr.harris at gmail.com>
> Apropos column/row vectors, I've toyed a bit with the idea of adding a
> flag to numpy arrays to indicate that the last index is one or the other,
> and maybe neither.
I don't follow this. wouldn't it ony be an issue for 1D arrays, rather than
the "last index". Or maybe I'm totally missing the point.
But anyway, are (N,1) and (1, N) arrays insufficient for representing
column and row vectors for some reason? If not -- then we have a way to
express a column or row vector, we just need an easier and more obvious way
to create them.
*maybe* we could have actual column and row vector classes -- they would BE
regular arrays, with (1,N) or (N,1) dimensions, and act the same in every
way except their __repr__. and we're provide handy factor functions for
These were needed to complete the old Matrix class -- which is no longer
needed now that we have @ (i.e. a 2D array IS a matrix)
Note: this is not very well thought out!
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion