MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / count_contains

Method count_contains

lib/matplotlib/transforms.py:584–598  ·  view source on GitHub ↗

Count the number of vertices contained in the `Bbox`. Any vertices with a non-finite x or y value are ignored. Parameters ---------- vertices : (N, 2) array

(self, vertices)

Source from the content-addressed store, hash-verified

582 for yf0, yf1 in itertools.pairwise(yf)]
583
584 def count_contains(self, vertices):
585 """
586 Count the number of vertices contained in the `Bbox`.
587 Any vertices with a non-finite x or y value are ignored.
588
589 Parameters
590 ----------
591 vertices : (N, 2) array
592 """
593 if len(vertices) == 0:
594 return 0
595 vertices = np.asarray(vertices)
596 with np.errstate(invalid='ignore'):
597 return (((self.min < vertices) &
598 (vertices < self.max)).all(axis=1).sum())
599
600 def count_overlaps(self, bboxes):
601 """

Callers 1

_find_best_positionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected