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

Function test_trirefine_masked

lib/matplotlib/tests/test_triangulation.py:1078–1089  ·  view source on GitHub ↗
(interpolator)

Source from the content-addressed store, hash-verified

1076 mtri.CubicTriInterpolator],
1077 ids=['linear', 'cubic'])
1078def test_trirefine_masked(interpolator):
1079 # Repeated points means we will have fewer triangles than points, and thus
1080 # get masking.
1081 x, y = np.mgrid[:2, :2]
1082 x = np.repeat(x.flatten(), 2)
1083 y = np.repeat(y.flatten(), 2)
1084
1085 z = np.zeros_like(x)
1086 tri = mtri.Triangulation(x, y)
1087 refiner = mtri.UniformTriRefiner(tri)
1088 interp = interpolator(tri, z)
1089 refiner.refine_field(z, triinterpolator=interp, subdiv=2)
1090
1091
1092def meshgrid_triangles(n):

Callers

nothing calls this directly

Calls 1

refine_fieldMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…