[Numpy-discussion] buggy buggy bugyy: format and casting ==> BUG in numpy.sum?
svetosch at gmx.net
Mon Sep 18 15:30:22 CDT 2006
Christopher Barker schrieb:
> Sven Schreiber wrote:
>> on my 1.0b5 I also see this docstring which indeed seems obsolete.
> I get this docs string from :
> >>> import numpy as N
> >>> N.__version__
> >>> a = N.arange(10)
> >>> help( a.sum)
> a.sum(axis=None, dtype=None) -> Sum of array over given axis.
> Sum the array over the given axis. If the axis is None, sum over
> all dimensions of the array.
> that looks right to me.
Well here's what we had in mind:
sum(x, axis=None, dtype=None, out=None)
>>> sum([0.5, 1.5])
>>> sum([0.5, 1.5], dtype=Int32)
>>> sum([[0, 1], [0, 5]])
>>> sum([[0, 1], [0, 5]], axis=1)
And you can see the third example would now be wrong, giving a scalar of
More information about the Numpy-discussion