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

Function f

galleries/examples/event_handling/ginput_manual_clabel_sgskip.py:67–71  ·  view source on GitHub ↗
(x, y, pts)

Source from the content-addressed store, hash-verified

65
66# Define a nice function of distance from individual pts
67def f(x, y, pts):
68 z = np.zeros_like(x)
69 for p in pts:
70 z = z + 1/(np.sqrt((x - p[0])**2 + (y - p[1])**2))
71 return 1/z
72
73
74X, Y = np.meshgrid(np.linspace(-1, 1, 51), np.linspace(-1, 1, 51))

Callers 1

Calls 1

sqrtMethod · 0.80

Tested by

no test coverage detected