[Numpy-discussion] np.asarray atleast_float64 ?

josef.pktd@gmai... josef.pktd@gmai...
Sat Jun 8 07:52:44 CDT 2013


Is there anything to require a numpy array with a minimum numeric dtype?

To avoid lower precision calculations and be upwards compatible, something like

x = np.asarray(x, >=np.float64)

that converts ints, bool and lower precision to float64 but leaves
higher precision float and complex double alone.


Josef


More information about the NumPy-Discussion mailing list