MCPcopy
hub / github.com/pydata/xarray / test_encode_cf_datetime_pandas_min

Function test_encode_cf_datetime_pandas_min

xarray/tests/test_coding_times.py:894–903  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

892
893
894def test_encode_cf_datetime_pandas_min() -> None:
895 # GH 2623
896 dates = pd.date_range("2000", periods=3)
897 num, units, calendar = encode_cf_datetime(dates)
898 expected_num = np.array([0.0, 1.0, 2.0])
899 expected_units = "days since 2000-01-01 00:00:00"
900 expected_calendar = "proleptic_gregorian"
901 np.testing.assert_array_equal(num, expected_num)
902 assert units == expected_units
903 assert calendar == expected_calendar
904
905
906@requires_cftime

Callers

nothing calls this directly

Calls 1

encode_cf_datetimeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…