On Thu, Jul 16, 2015 at 7:14 PM, Nathaniel Smith <n...@pobox.com> wrote: > > On Thu, Jul 16, 2015 at 9:18 AM, Antoine Pitrou <solip...@pitrou.net> wrote:
> > while adding int8 and uint8 will give int16 as result > > (promoting to the smallest fitting type). > > I understand this to be a consequence of the previous rule (results > should match inputs) combined with the need to find a common input > type. Specifically, when combining signed and unsigned ints, we need to find a signed int type that can simultaneously hold both of the *inputs*. Whether the *output* would fit or overflow is not what the rules are concerned with. -- Robert Kern
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion