[Numpy-discussion] What is .T?
Tue May 6 14:37:57 CDT 2008
On Tue, May 6, 2008 at 12:28 PM, Robert Kern <email@example.com> wrote:
> On Tue, May 6, 2008 at 2:22 PM, Keith Goodman <firstname.lastname@example.org> 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
> def T(self):
> return self.transpose()
That works very nicely. Thank you.
More information about the Numpy-discussion