[SciPy-dev] about numpy.max() and numpy.min() - isn't it a bug?

Darren Dale dd55@cornell....
Tue Aug 14 11:05:08 CDT 2007


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


More information about the Scipy-dev mailing list