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

Bill Baxter wbaxter at gmail.com
Fri Jul 7 07:31:06 CDT 2006


I think the thread to this point can be pretty much summarized by:

while True:
    Bill: "2D transpose is common so it should have a nice syntax"
    Tim, Robert, Sasha, and Ed: "No it's not."

Very well.  I think it may be a self fulfilling prophecy, though.  I.e. if
matrix operations are cumbersome to use, then -- surprise surprise -- the
large user base for matrix-like operations never materializes.  Potential
converts just give numpy the pass, and go to Octave or Scilab, or stick with
Matlab, R or S instead.

Why all the fuss about the .T?  Because any changes to functions (like
making ones() return a matrix) can easily be worked around on the user side,
as has been pointed out.  But as far as I know -- do correct me if I'm wrong
-- there's no good way for a user to add an attribute to an existing class.
After switching from matrices back to arrays, .T was the only thing I really
missed from numpy.matrix.

I would be all for a matrix class that was on equal footing with array and
as easy to use as matrices in Matlab.  But my experience using
numpy.matrixwas far from that, and, given the lack of enthusiasm for
matrices around
here, that seems unlikely to change.  However, I'm anxious to see what Ed
has up his sleeves in the other thread.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060707/ad3f76b2/attachment-0001.html 


More information about the Numpy-discussion mailing list