[Numpy-discussion] suggestions for Matrix-related changes

Keith Goodman kwgoodman at gmail.com
Tue Jul 11 19:11:12 CDT 2006


On 7/11/06, Travis Oliphant <oliphant at ee.byu.edu> wrote:
> JJ wrote:
> >4) It would be nice if the linear algebra package and other packages returned
> >matrices if given matrices.  For example, if M is a matrix, svd(M) now returns
> >
> >
> Svd returns matrices now.  Except for the list of singular values which
> is still an array.  Do you want a 1xn matrix instead of an array?

That sounds good to me.

The same goes for eig and eigh:

>> eigval,eigvec = linalg.eig(rand(2,2))

>> eigval
array([-0.06035002,  0.14320639])

>> eigvec

matrix([[ 0.54799954, -0.83647863],
        [-0.83647863, -0.54799954]])




More information about the Numpy-discussion mailing list