Handle deprecated NumPy type aliases in samples

These aliases were deprecated in numpy 1.20.0 (January 2021), and removed in 1.24.0 (December 2022)
This helps with NumPy 2 support (June 2024).

Fixes: numpy-deprecated-type-alias (NPY001)
Ruff rule to help transition: https://docs.astral.sh/ruff/rules/numpy-deprecated-type-alias/
This commit is contained in:
Edouard Choinière
2025-02-08 17:11:21 +00:00
parent 6ab1b5ced4
commit a2743ad554
7 changed files with 11 additions and 11 deletions

View File

@@ -30,7 +30,7 @@ def YScaleFun(center):
"""
# center gets ignored in this case
return np.array((5e7, 1), np.float)
return np.array((5e7, 1), float)
class DrawFrame(wx.Frame):