On Mon, 13 Jun 2016 10:05:08 -0400 Alan Isaac <alan.is...@gmail.com> wrote: > > 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'>
The `uint64 x int8 -> float64` is IMHO an abberration in Numpy's typing logic. Regardless, it's not specific to the power operator: >>> np.int64(2) + np.int32(3) 5 >>> np.uint64(2) + np.int32(3) 5.0 The other complications have to do with the type width, which are less annoying than changing the numeric kind altogether (as would be done by mandating int x int -> float in all cases). Regards Antoine. _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion