[PYTHON MATRIX-SIG] Newbie: transpose

Carlos Maltzahn carlosm@piper.cs.colorado.edu
Thu, 20 Mar 1997 17:46:17 -0700 (MST)


Excuse me if the following has been discussed extensively (if so, could
somebody point me to the relevant archive messages?): To me
transpose() seems to act counter-intuitive:

Doing:

>>> b
array([3, 4, 5])
>>> transpose(b)
array([3, 4, 5])
>>>

I expected:

>>> transpose(b)
array([[3],
       [4],
       [5]])
>>>

Doing:

b = b[:,NewAxis]
>>> b
array([[3],
       [4],
       [5]])
>>> c = transpose(b)
>>> c
array([       [3, 4, 5]])
>>> c.shape
(1, 3)
>>>

I expected:

>>> c = transpose(b)
>>> c
array([3, 4, 5])
>>> c.shape
(3,)
>>>

???

Thanks,
Carlos


_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________