[Numpy-discussion] suggestions for Matrix-related changes

Sven Schreiber svetosch at gmx.net
Wed Jul 12 04:44:46 CDT 2006


JJ schrieb:
> Travis Oliphant <oliphant <at> ee.byu.edu> writes:

> 
>> 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?

Although I'm a matrix supporter, I'm not sure here. Afaics the pro
argument is to have *everything* a matrix when you're in that camp. Fair
enough. But then it's already not clear if you want a row or a column,
and you carry an extra dimension around, which is sometimes annoying
e.g. for cumulation of the values, which I do a lot (for eigenvalues,
that is). So for my personal use I came to the conclusion that the
status quo of numpy (array for the value list, matrix for the decomp) is
just fine.

So maybe the people in favor of values-in-1xn-matrices can tell why they
need to matrix-multiply the value array afterwards, because that's the
only benefit I can see here.

> 
> I had just tried this with my new version of numpy, but I had used svd 
> as follows:
> import scipy.linalg as la
> res = la.svd(M)
> That returned arrays, but I see that using:
> res = linalg.svd(M)
> returns matrices.  Apparently, both numpy and scipy have linalg 
> packages, which differ.  I did not know that.  Whoops.
> 

I'm trying to get by with numpy (good that kron was brought over!), but
eventually I will need scipy -- I was hoping that all the matrix
discussion in the numpy list implicitly applied to scipy as well. Is
that not true?

Cheers,
Sven





More information about the Numpy-discussion mailing list