Skip to content

Commit

Permalink
Replace remaining numpy.float with builtin float
Browse files Browse the repository at this point in the history
  • Loading branch information
nicogodet committed May 10, 2023
1 parent 654c055 commit b30ad78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/profilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def slopes_pct(p):
Returns the x (distance from origin) and y (slope in percentage)
coordinates for the plot.
"""
x = np.array(p["l"], dtype=np.float)
y = np.array(p["z"], dtype=np.float)
x = np.array(p["l"], dtype=float)
y = np.array(p["z"], dtype=float)
slope_pct = 100.0 * (y[1:] - y[:-1]) / (x[1:] - x[:-1])
slope_pct = np.concatenate((slope_pct[0:1], 0.5 * (slope_pct[1:] + slope_pct[:-1]), slope_pct[-1:]))
slope_pct[np.isnan(slope_pct)] = 0
Expand Down

0 comments on commit b30ad78

Please sign in to comment.