np.float was deprecated in Numpy 1.20.
np.float
The general class of floating point dtypes is np.floating, so check for that.
np.floating