On Tue, May 6, 2008 at 12:28 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > > On Tue, May 6, 2008 at 2:22 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > > What is .T? It looks like an attribute, behaves like a method, and > > smells like magic. I'd like to add it to my class but don't no where > > to begin. > > It is a property. It returns the transpose of the array. If you had a > .transpose() method on your class already, you could do (in Python > 2.4+) > > @property > def T(self): > return self.transpose()
That works very nicely. Thank you. _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
