Skip to content

Commit

Permalink
Merge pull request #88 from PANOimagen/fix-numpy1.24
Browse files Browse the repository at this point in the history
Replace remaining `numpy.float` with builtin `float`
  • Loading branch information
nicogodet authored May 10, 2023
2 parents 654c055 + b30ad78 commit b8b525c
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 b8b525c

Please sign in to comment.