(self, dtype)
| 4452 | |
| 4453 | @pytest.mark.xfail(reason="interpolate_na uses numpy.vectorize") |
| 4454 | def test_interpolate_na(self, dtype): |
| 4455 | array1 = ( |
| 4456 | create_nan_array([1.4, np.nan, 2.3, np.nan, np.nan, 9.1], dtype) |
| 4457 | * unit_registry.degK |
| 4458 | ) |
| 4459 | array2 = ( |
| 4460 | create_nan_array([4.3, 9.8, 7.5, np.nan, 8.2, np.nan], dtype) |
| 4461 | * unit_registry.Pa |
| 4462 | ) |
| 4463 | ds = xr.Dataset({"a": ("x", array1), "b": ("x", array2)}) |
| 4464 | units = extract_units(ds) |
| 4465 | |
| 4466 | expected = attach_units( |
| 4467 | strip_units(ds).interpolate_na(dim="x"), |
| 4468 | units, |
| 4469 | ) |
| 4470 | actual = ds.interpolate_na(dim="x") |
| 4471 | |
| 4472 | assert_units_equal(expected, actual) |
| 4473 | assert_equal(expected, actual) |
| 4474 | |
| 4475 | @pytest.mark.parametrize( |
| 4476 | "unit,error", |
nothing calls this directly
no test coverage detected