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

Function test_contains_point

lib/matplotlib/tests/test_patches.py:656–666  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

654
655
656def test_contains_point():
657 ell = mpatches.Ellipse((0.5, 0.5), 0.5, 1.0)
658 points = [(0.0, 0.5), (0.2, 0.5), (0.25, 0.5), (0.5, 0.5)]
659 path = ell.get_path()
660 transform = ell.get_transform()
661 radius = ell._process_radius(None)
662 expected = np.array([path.contains_point(point,
663 transform,
664 radius) for point in points])
665 result = np.array([ell.contains_point(point) for point in points])
666 assert np.all(result == expected)
667
668
669def test_contains_points():

Callers

nothing calls this directly

Calls 4

get_pathMethod · 0.95
_process_radiusMethod · 0.80
get_transformMethod · 0.45
contains_pointMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…