Could numpy.matlib.nanmax return a matrix?

Sven Schreiber svetosch at gmx.net
Mon Nov 13 04:02:47 CST 2006


Pierre GM schrieb:
> On Sunday 12 November 2006 17:08, A. M. Archibald wrote:
>> On 12/11/06, Keith Goodman <kwgoodman at gmail.com> wrote:
>>> Is anybody interested in making x.max() and nanmax() behave the same
>>> for matrices, except for the NaN part? That is, make
>>> numpy.matlib.nanmax return a matrix instead of an array.
> 
> Or, you could use masked arrays... In the new implementation, you can add a 
> mask to a subclassed array (such as matrix) to get a regular masked array. If 
> you fill this masked array, you get an array of the same subclass.
> 

That is very interesting, but I agree with Keith and would actually call
this a bug. (If still present in 1.0, that is, haven't checked, I think
Keith used some rc?.) One proclaimed goal of numpy for the 1.0 release
has been to be as matrix-friendly as possible, for which I am very
grateful.

Still, the use of masked arrays looks more attractive every time they're
mentioned...

-sven

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




More information about the Numpy-discussion mailing list