Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5f2d4dd + bd1d994 commit 418460bCopy full SHA for 418460b
1 file changed
lib/matplotlib/transforms.py
@@ -645,14 +645,16 @@ def splity(self, *args):
645
def count_contains(self, vertices):
646
"""
647
Count the number of vertices contained in the :class:`Bbox`.
648
+ Any vertices with a non-finite x or y value are ignored.
649
650
*vertices* is a Nx2 Numpy array.
651
652
if len(vertices) == 0:
653
return 0
654
vertices = np.asarray(vertices)
- return (
655
- ((self.min < vertices) & (vertices < self.max)).all(axis=1).sum())
+ with np.errstate(invalid='ignore'):
656
+ return (((self.min < vertices) &
657
+ (vertices < self.max)).all(axis=1).sum())
658
659
def count_overlaps(self, bboxes):
660
0 commit comments