[SciPy-dev] about numpy.max() and numpy.min() - isn't it a bug?
Dmitrey Kroshko
openopt at ukr.net
Tue Aug 14 11:41:51 EDT 2007
Hi all,
as for me I think the behavior of the func is not optimal
>>> from numpy import *
>>> max(array(2.), 0)
array(2.0)
>>> max(array(-2.), 0)
0
So suppose usually I have x values > 0 and 1 time from 100000 - less than zero.
Then sometimes I just get the error
"int object has no attribute T"
(provided I have code r = max(x,0).T, also, here could be other funcs - max(x,0).tolist(), max(x,0).sum() etc)
the same bug if I have 0. (float) instead of 0.
Maybe, the same should be fixed for numpy.min() :
>>> min(array(-2.), 0)
array(-2.0)
>>> min(array(2.), 0)
0
Regards, D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20070814/247d4f9c/attachment.html>
More information about the SciPy-Dev
mailing list