Here's my code:
import matplotlib.pyplot as plt img = plt.imread(<some image path>)
The img now is an array with dtype = unit8. How can I convert it into an array with dtype = float32?
img
dtype = unit8
dtype = float32
Thanks!
Use ndarray.astype:
ndarray.astype
img.astype('float32')