[Numpy-discussion] possible bug with numpy.object_
Christopher Barker
Chris.Barker at noaa.gov
Thu Aug 31 13:51:33 CDT 2006
Tim Hochberg wrote:
>> That's what I'd expect, but what if you start with a (0,) array:
>> >>> a = N.array([]).sum(); a.shape; a.size; a
>> ()
>> 1
>> 0
>>
>> where did that zero come from?
>>
> More or less from:
>
> >>> numpy.add.identity
> 0
I'm not totally sure, but I think I'd rather it raise an exception.
However, if it's not going to, then 0 is really the only reasonable answer.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Numpy-discussion
mailing list