We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5be59ab commit 86f9f9cCopy full SHA for 86f9f9c
lib/matplotlib/transforms.py
@@ -648,10 +648,11 @@ def count_contains(self, vertices):
648
return 0
649
vertices = np.asarray(vertices)
650
x0, y0, x1, y1 = self._get_extents()
651
- dx0 = np.sign(vertices[:, 0] - x0)
652
- dy0 = np.sign(vertices[:, 1] - y0)
653
- dx1 = np.sign(vertices[:, 0] - x1)
654
- dy1 = np.sign(vertices[:, 1] - y1)
+ with np.errstate(invalid='ignore'):
+ dx0 = np.sign(vertices[:, 0] - x0)
+ dy0 = np.sign(vertices[:, 1] - y0)
+ dx1 = np.sign(vertices[:, 0] - x1)
655
+ dy1 = np.sign(vertices[:, 1] - y1)
656
inside = ((abs(dx0 + dx1) + abs(dy0 + dy1)) == 0)
657
return np.sum(inside)
658
0 commit comments