()
| 620 | |
| 621 | |
| 622 | def test_cf_timedelta_2d() -> None: |
| 623 | units = "days" |
| 624 | numbers = np.atleast_2d([1, 2, 3]) |
| 625 | |
| 626 | timedeltas = pd.to_timedelta(["1D", "2D", "3D"]).as_unit("ns") |
| 627 | timedeltas_2d = np.atleast_2d(timedeltas.to_numpy()) |
| 628 | expected = timedeltas_2d |
| 629 | |
| 630 | actual = decode_cf_timedelta(numbers, units) |
| 631 | assert_array_equal(expected, actual) |
| 632 | assert expected.dtype == actual.dtype |
| 633 | |
| 634 | |
| 635 | @pytest.mark.parametrize("encoding_unit", FREQUENCIES_TO_ENCODING_UNITS.values()) |
nothing calls this directly
no test coverage detected
searching dependent graphs…