mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
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:
@@ -100,8 +100,8 @@ class NodeObject(FC.Group, MovingObjectMixin, ConnectorObjectMixin):
|
||||
TextColor = "Black",
|
||||
InForeground = False,
|
||||
IsVisible = True):
|
||||
XY = np.asarray(XY, np.float).reshape(2,)
|
||||
WH = np.asarray(WH, np.float).reshape(2,)
|
||||
XY = np.asarray(XY, float).reshape(2,)
|
||||
WH = np.asarray(WH, float).reshape(2,)
|
||||
Label = FC.ScaledText(Label,
|
||||
XY,
|
||||
Size = WH[1] / 2.0,
|
||||
|
||||
Reference in New Issue
Block a user