Skip to content

Commit

Permalink
np.float-->float for more recent versions of np
Browse files Browse the repository at this point in the history
  • Loading branch information
dnarayanan committed Apr 3, 2023
1 parent 3e1e215 commit af0e272
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hyperion/util/interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def interp1d_fast(x, y, xval):
if x.dtype != float or y.dtype != float:
x, y = x.astype(float), y.astype(float)
if np.isscalar(xval):
return interp1d_linear_scalar(x, y, np.float(xval))
return interp1d_linear_scalar(x, y, float(xval))
else:
if xval.ndim > 1:
return interp1d_linear_array(x, y, xval.flatten()).reshape(xval.shape)
Expand All @@ -74,7 +74,7 @@ def interp1d_fast_loglog(x, y, xval):
if x.dtype != float or y.dtype != float:
x, y = x.astype(float), y.astype(float)
if np.isscalar(xval):
return interp1d_loglog_scalar(x, y, np.float(xval))
return interp1d_loglog_scalar(x, y, float(xval))
else:
if xval.ndim > 1:
return interp1d_loglog_array(x, y, xval.flatten()).reshape(xval.shape)
Expand All @@ -90,7 +90,7 @@ def interp1d_fast_linlog(x, y, xval):
if x.dtype != float or y.dtype != float:
x, y = x.astype(float), y.astype(float)
if np.isscalar(xval):
return interp1d_linlog_scalar(x, y, np.float(xval))
return interp1d_linlog_scalar(x, y, float(xval))
else:
if xval.ndim > 1:
return interp1d_linlog_array(x, y, xval.flatten()).reshape(xval.shape)
Expand All @@ -106,7 +106,7 @@ def interp1d_fast_loglin(x, y, xval):
if x.dtype != float or y.dtype != float:
x, y = x.astype(float), y.astype(float)
if np.isscalar(xval):
return interp1d_loglin_scalar(x, y, np.float(xval))
return interp1d_loglin_scalar(x, y, float(xval))
else:
if xval.ndim > 1:
return interp1d_loglin_array(x, y, xval.flatten()).reshape(xval.shape)
Expand Down

0 comments on commit af0e272

Please sign in to comment.