style: Normalise numpy imports with import numpy as np

The convention when importing numpy is to use `import numpy as np`

Fixes: unconventional-import-alias (ICN001)
Ruff rule: https://docs.astral.sh/ruff/rules/unconventional-import-alias/
This commit is contained in:
Edouard Choinière
2025-02-08 16:48:57 +00:00
parent 45f9e89f5d
commit 95cafd1a3f
26 changed files with 233 additions and 233 deletions

View File

@@ -5,7 +5,7 @@ PolyEditor: a simple app for editing polygons
Used as a demo for FloatCanvas
"""
import numpy as N
import numpy as np
import random
import numpy.random as RandomArray
@@ -112,7 +112,7 @@ class DrawFrame(wx.Frame):
dc.SetPen(wx.Pen('WHITE', 2, wx.SHORT_DASH))
dc.SetLogicalFunction(wx.XOR)
if self.SelectedPointNeighbors is None:
self.SelectedPointNeighbors = N.zeros((3,2), N.float64)
self.SelectedPointNeighbors = np.zeros((3,2), np.float64)
#fixme: This feels very inelegant!
if Index == 0:
self.SelectedPointNeighbors[0] = self.SelectedPoly.Points[-1]