[Numpy-discussion] Help needed with numpy 10.5 release blockers
Sebastian Haase
haase@msg.ucsf....
Sun Mar 23 16:06:28 CDT 2008
(please copy to the trace page)
On Sat, Mar 22, 2008 at 6:08 PM, James Philbin <philbinj@gmail.com> wrote:
> I'm not sure that #669
> (http://projects.scipy.org/scipy/numpy/ticket/669) is a bug, but
> probably needs some discussion (see the last reply on that page). The
> cast is made because we don't know that the LHS is non-negative.
> However it could be argued that operations involving two integers
> should never cast to a float, in which case maybe an exception should
> be thrown.
>
I don't understand this argument, isn't this case similar to any
overflow / wrap-around in "limited" dtypes. Like this:
>>> N.uint8(200) + N.uint8(200)
144
>>> _.dtype
uint8
You would not argue that uint8 has to get converted to "???" because
it can produce (mathematically) "wrong" results !
My 2 cents,
Sebastian Haase
More information about the Numpy-discussion
mailing list