Since numpy 1.20 the aliases np.int and np.float are deprecated (see https://numpy.org/devdocs/release/1.20.0-notes.html#using-the-aliases-of-builtin-types-like-np-int-is-deprecated). The buildin types should be used instead. Since numpy 1.24 an AttributeError exception is thrown when np.int or np.float is used.

This commit is contained in:
Tim Riddermann
2023-02-28 16:07:02 +01:00
parent 71ed075c78
commit 516539a7a0
3 changed files with 6 additions and 6 deletions

View File

@@ -49,7 +49,7 @@ class PixelBitmap:
else:
raise FC.FloatCanvasError("PixelBitmap takes only a wx.Bitmap or a wx.Image as input")
self.XY = np.asarray(XY, dtype=np.int).reshape((2,))
self.XY = np.asarray(XY, dtype=int).reshape((2,))
self.Position = Position
(self.Width, self.Height) = self.Bitmap.GetWidth(), self.Bitmap.GetHeight()