{*} except that negative axes for swapaxes doesn't seem work currently, so instead it would need to be something like:
a.transpose( a.shape[:-2] + (a.shape[-1],a.shape[-2]) )
with a check for "if ndim > 1", of course.
Apparently a.swapaxes(-2,-1) does work, and it does exactly what I am suggesting, including leaving zero-d and 1-d arrays alone. Not sure why I thought it wasn't working.
So in short my proposal is to:
-- make a.T a property of array that returns a.swapaxes(-2,-1),
-- make a.H a property of array that returns a.conjugate().swapaxes(-2,-1)
and maybe
-- make a.M a property of array that returns numpy.asmatrix(a)
--Bill
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion