On 6/13/2016 4:47 AM, Antoine Pitrou wrote:
Currently, the choice is simple: if you want an int output,
have an int input; if you want a float output, have a float output.


That is a misunderstanding, which may be influencing the discussion.
Examples of complications:

>>> type(np.int8(2)**2)
<type 'numpy.int32'>
>>> type(np.uint64(2)**np.int8(2))
<type 'numpy.float64'>

I don't think anyone has proposed first principles
from which the desirable behavior could be deduced.
I do think reference to the reasoning used by other
languages in making this decision could be helpful.

Alan Isaac
(on Windows)
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to