[Numpy-discussion] min bug

Alan McIntyre alan.mcintyre at gmail.com
Tue Nov 17 02:49:00 EST 2009

On Mon, Nov 16, 2009 at 11:34 PM, "V. Armando Solé" <sole at esrf.fr> wrote:
> Sebastian Berg wrote:
>> Known issue, I think someone posted about it a while ago too. The numpy
>> min is array aware, and it expects an array. The second argument is the
>> axis, which in the case of a single number doesn't matter.
> I think I have to agree with the original poster.
> It would be more correct to rise an exception because the axis is beyond
> the number of axes than to return a confusing result.

Hm, now that I actually try my example

    min((5000,), 4)

it fails with an axis out of bounds error.  I presume there's a reason
why a 0-D array gets special treatment?

More information about the NumPy-Discussion mailing list