()
| 346 | |
| 347 | @requires_scipy |
| 348 | def test_interpolators(): |
| 349 | for method, interpolator in [ |
| 350 | ("linear", NumpyInterpolator), |
| 351 | ("linear", ScipyInterpolator), |
| 352 | ("spline", SplineInterpolator), |
| 353 | ]: |
| 354 | xi = np.array([-1, 0, 1, 2, 5], dtype=np.float64) |
| 355 | yi = np.array([-10, 0, 10, 20, 50], dtype=np.float64) |
| 356 | x = np.array([3, 4], dtype=np.float64) |
| 357 | |
| 358 | f = interpolator(xi, yi, method=method) |
| 359 | out = f(x) |
| 360 | assert pd.isnull(out).sum() == 0 |
| 361 | |
| 362 | |
| 363 | def test_interpolate_use_coordinate(): |