()
| 1343 | |
| 1344 | @requires_cftime |
| 1345 | def test_scalar_unit() -> None: |
| 1346 | # test that a scalar units (often NaN when using to_netcdf) does not raise an error |
| 1347 | variable = Variable(("x", "y"), np.array([[0, 1], [2, 3]]), {"units": np.nan}) |
| 1348 | result = CFDatetimeCoder().decode(variable) |
| 1349 | assert np.isnan(result.attrs["units"]) |
| 1350 | |
| 1351 | |
| 1352 | @requires_cftime |
nothing calls this directly
no test coverage detected
searching dependent graphs…