(self)
| 2939 | |
| 2940 | @pytest.mark.xfail(reason="uses numpy.vectorize") |
| 2941 | def test_interpolate_na(self): |
| 2942 | array = ( |
| 2943 | np.array([-1.03, 0.1, 1.4, np.nan, 2.3, np.nan, np.nan, 9.1]) |
| 2944 | * unit_registry.m |
| 2945 | ) |
| 2946 | x = np.arange(len(array)) |
| 2947 | data_array = xr.DataArray(data=array, coords={"x": x}, dims="x") |
| 2948 | |
| 2949 | units = extract_units(data_array) |
| 2950 | expected = attach_units(strip_units(data_array).interpolate_na(dim="x"), units) |
| 2951 | actual = data_array.interpolate_na(dim="x") |
| 2952 | |
| 2953 | assert_units_equal(expected, actual) |
| 2954 | assert_identical(expected, actual) |
| 2955 | |
| 2956 | @pytest.mark.parametrize( |
| 2957 | "unit,error", |
nothing calls this directly
no test coverage detected