MCPcopy Index your code
hub / github.com/pydata/xarray / func

Function func

xarray/tests/test_interp.py:135–143  ·  view source on GitHub ↗
(obj, new_x)

Source from the content-addressed store, hash-verified

133
134 # scipy interpolation for the reference
135 def func(obj, new_x):
136 return scipy.interpolate.interp1d(
137 da[dim],
138 obj.data,
139 axis=obj.get_axis_num(dim),
140 bounds_error=False,
141 fill_value=np.nan,
142 kind=method, # type: ignore[arg-type,unused-ignore]
143 )(new_x)
144
145 if dim == "x":
146 coords = {"x": xdest, "y": da["y"], "x2": ("x", func(da["x2"], xdest))}

Callers 4

test_interpolate_1dFunction · 0.70
test_interpolate_scalarFunction · 0.70

Calls 1

get_axis_numMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…