Python Numpy dtype change without changing source code

Viewed 35

I'm in trouble with python code.

Can I change numpy dtype without changing source code? here the example,

np.asarray([0,5,10,15], dtype=np.float32)/297

here the float32 is not suitable for my calculation. So I want to change it to float64. But I can't change python source code. Can I do this without changing source code ? Is there any python option for changing data type?

Thank You

0 Answers
Related