On 6/10/2016 2:42 AM, Nathaniel Smith wrote:
I dunno, with my user hat on I'd be incredibly surprised / confused /
annoyed if an innocent-looking expression like

  np.arange(10) ** 2

started returning floats... having exact ints is a really nice feature
of Python/numpy as compared to R/Javascript, and while it's true that
int64 can overflow, there are also large powers that can be more
precisely represented as int64 than float.


Is np.arange(10)**10 also "innocent looking" to a Python user?

Also, I am confused by what "large powers" means in this context.
Is 2**40 a "large power"?

Finally, is np.arange(1,3)**-2 "innocent looking" to a Python user?

Cheers,
Alan

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

Reply via email to