about numpy.max() and numpy.min() - isn't it a bug?
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.
On Tuesday 14 August 2007 11:41:51 am Dmitrey Kroshko wrote:
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
You are not using numpy's amax and amin, but the python builtins.
import numpy
numpy.amin(numpy.array(-2.), 0) -2.0
participants (2)
-
Darren Dale -
Dmitrey Kroshko