There is no one that doesn't (have a lot to learn, that is) - we're all here to
help each other do that. ;-)
DG
--- On Tue, 7/7/09, Phillip M. Feldman wrote:
> From: Phillip M. Feldman
> Subject: Re: [Numpy-discussion] transpose of a matrix should be another matrix
>
,
[7, 8, 9]])
b = a.T
b
matrix([[1, 4, 7],
[2, 5, 8],
[3, 6, 9]])
DG
--- On Mon, 7/6/09, Chris Colbert wrote:
From: Chris Colbert
Subject: Re: [Numpy-discussion] transpose of a matrix should be another matrix
To: "Discussion of Numerical Python&qu
On Mon, 7/6/09, Chris Colbert wrote:
> From: Chris Colbert
> Subject: Re: [Numpy-discussion] transpose of a matrix should be another matrix
> To: "Discussion of Numerical Python"
> Date: Monday, July 6, 2009, 10:42 PM
> you actually have to call the method as
> transpose
and my grammar just sucks tonight...
On Tue, Jul 7, 2009 at 1:46 AM, Chris Colbert wrote:
> I should clarify, everything in python is an object. Even methods of
> classes. The syntax to invoke a method is the method name followed by the
> parenthese (). If you leave off the parentheses, python r
I should clarify, everything in python is an object. Even methods of
classes. The syntax to invoke a method is the method name followed by the
parenthese (). If you leave off the parentheses, python return the method
object. This can be useful if you want to pass the method to another
function or m
you actually have to call the method as transpose(). What you requested was
the actual method.
>>> import numpy as np
>>> a = np. matrix([[1,2,3],[4,5,6],[7,8,9]])
>>> a
matrix([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
>>> b = a.transpose()
>>> b
matrix([[1, 4, 7],
[2, 5, 8],
I'm using the Enthought Python Distribution. When I define a matrix and
transpose it, it appears that the result is no longer a matrix (see below).
This is both surprising and disappointing. Any suggestions will be
appreciated.
In [16]: A=matrix([[1,2,3],[4,5,6],[7,8,9]])
In [17]: B=A.transpos