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()
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion