On Mon, Jun 20, 2016 at 2:11 PM, Alan Isaac <alan.is...@gmail.com> wrote:
> On 6/10/2016 8:28 PM, Allan Haldane wrote:
>>
>> My understanding is that numpy never upcasts based on the values, it
>> upcasts based on the datatype ranges.
>>
>> http://docs.scipy.org/doc/numpy-1.10.1/reference/ufuncs.html#casting-rules
>
>
>
>
>>>> (np.int64(2**6)*np.arange(5,dtype=np.int8)).dtype
> dtype('int8')
>>>> (np.int64(2**7)*np.arange(5,dtype=np.int8)).dtype
> dtype('int16')

If you have the time to check for existing bug reports about this, and
file a new bug if you don't find one, then it'd be appreciated. I
suspect it's something that would be better handled as part of an
overhaul of the casting rules in general rather than on its own, but
it'd be good to at least have a record of it somewhere.

-n

-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to