On Sat, 2013-06-08 at 08:52 -0400, [email protected] wrote:
> 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)

np.result_type(arr, np.float64) uses the usual numpy promotion rules.
But it doesn't do the "asarray" part. Its still the closest thing I can
think of right now.

- Sebastian

> 
> that converts ints, bool and lower precision to float64 but leaves
> higher precision float and complex double alone.
> 
> 
> Josef
> _______________________________________________
> NumPy-Discussion mailing list
> [email protected]
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 


_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to