x.min() depends on ordering

Tim Hochberg tim.hochberg at ieee.org
Sat Nov 11 18:49:26 CST 2006


Robert Kern wrote:
> Keith Goodman wrote:
>   
>> How about a nanmin() function?
>>     
>
> Already there.
>
> In [2]: nanmin?
> Type:           function
> Base Class:     <type 'function'>
> Namespace:      Interactive
> File:
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy-1.0.1.dev3432-py2.5-macosx-10.4-i386.egg/numpy/lib/function_base.py
> Definition:     nanmin(a, axis=None)
> Docstring:
>     Find the minimium over the given axis, ignoring NaNs.
>
>   
Bah! That seems excessive. If I was king of the world one of the many 
things that I would stuff into a submodule is all the stuff relating to 
special values (nan, inf, isnan, isinf, namin, nanmax, nansum, 
nanargmax, nanargmin, nan_to_num, infty,  isneginf, isposinf and 
probably some others that I'm missing). First, these are mostly clutter 
in the base namespace. Not only would it make the main namespace easier 
to navigate in (although there's much clean up that would have to be 
done before it would be anything approaching easy to navigate). Second, 
for those who actually do need them, they'd be easier to find if they 
were all grouped together -- Keith for example would almost certainly 
have immediately found nanmin. Third, and this is perhaps a matter of 
opinion, there seems to be a sudden urge to abuse NaNs. Perhaps if they 
were shunted a bit off to the side, this temptation would be lifted.

Curmudgeonly yours,

-tim


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