Skip to content

Commit f5f884b

Browse files
committed
Fix rubberbanding on wx+py3.10.
Locally (Arch standard packages), it otherwise fails with File "/usr/lib/python3.10/site-packages/wx/core.py", line 1098, in _DC_DrawLineList return self._DrawLineList(lines, pens, []) TypeError: 'numpy.float64' object cannot be interpreted as an integer
1 parent 1535cdc commit f5f884b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,8 @@ def gui_repaint(self, drawDC=None, origin='WX'):
618618
else self.bitmap)
619619
drawDC.DrawBitmap(bmp, 0, 0)
620620
if self._rubberband_rect is not None:
621-
x0, y0, x1, y1 = self._rubberband_rect
621+
# Some versions of wx+python don't support numpy.float64 here.
622+
x0, y0, x1, y1 = map(int, self._rubberband_rect)
622623
drawDC.DrawLineList(
623624
[(x0, y0, x1, y0), (x1, y0, x1, y1),
624625
(x0, y0, x0, y1), (x0, y1, x1, y1)],

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy