[Numpy-discussion] .T Transpose shortcut for arrays again

Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Jul 6 15:18:43 EDT 2006


On 7/6/06, Tim Hochberg <tim.hochberg at cox.net> wrote:
> ...
> So this is essentially turning a row vector into a column vector? Is
> that right?
>
Being a definition, this is neither right nor wrong.  It all depends
on what you are using it for. If you want to distinguish row and
column vectors, you have to use rank-2, but it is convenient to to
think of rank-1 as an equivalent of either row or column and rank-0 as
a 1x1 array. If you define transpose as a rank-2 only operation, but
allow promotion of rank < 2 to rank 2, you end up with the rules of
S+.




More information about the NumPy-Discussion mailing list