DeprecationWarning: np.float
is a deprecated alias for the builtin float
. To silence this warning, use float
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64
here.
把错误那行代码里面的np.float(…) 改成np.float64(…)