[SciPy-dev] about numpy.max() and numpy.min() - isn't it a bug?
Alan G Isaac
Tue Aug 14 12:09:17 CDT 2007
On Tue, 14 Aug 2007, Dmitrey Kroshko apparently wrote:
> I use the min and max from numpy (from numpy import *)
No, Darren is giving you the answer. See below.
There are two problems.
One problem is that numpy.max exists for historical reason.
Another problem is that numpy.max is not import when you use import *.
As the saying goes:
"So don't do it!"
I.e., adopt practices that ensure you know the namespace you
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310
32 bit (Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> from numpy import *
Help on function amax in module numpy.core.fromnumeric:
amax(a, axis=None, out=None)
Return the maximum of 'a' along dimension axis.
Help on built-in function max in module __builtin__:
max(iterable[, key=func]) -> value
max(a, b, c, ...[, key=func]) -> value
With a single iterable argument, return its largest item.
With two or more arguments, return the largest argument.
More information about the Scipy-dev