[Numpy-discussion] matrix.std() returns array

Zachary Pincus zpincus at stanford.edu
Thu Apr 27 01:22:05 CDT 2006


On a slightly-related note, was anyone able to reproduce the  
exception with matrix types and the var() method?
e.g. numpy.matrix([[1,2,3], [1,2,3]]).var() complains about unaligned  
data...

Presumably if std is fixed in SVN, so is var. Also if a std unit test  
is added, a var one should be too.

Zach

On Apr 27, 2006, at 12:51 AM, Travis Oliphant wrote:

> Keith Goodman wrote:
>> I noticed that the mean of a matrix is a matrix but the standard
>> deviation of a matrix is an array. Is that the expected behavior? I'm
>> also getting the wrong values (0 and nan) for the standard deviation.
>> Did I mess something up?
>>
>> I'm trying to learn scipy (and python) by porting a small Octave
>> program. I installed numpy from svn (today) on a Debian box. And
>> numpy.test() says OK.
>>
>>
> This should be fixed now in SVN.  If somebody can add a test that  
> would be great.
>
> Note, that the methods taking axes also now preserve row and column  
> orientation for matrices.
>
> -Travis
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion





More information about the Numpy-discussion mailing list