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.
1 parent fc6a7ba commit bd1d994Copy full SHA for bd1d994
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