[Numpy-discussion] np.asarray atleast_float64 ?

josef.pktd at gmail.com josef.pktd at gmail.com
Sat Jun 8 08:52:44 EDT 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