We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70997ef commit 1126c9bCopy full SHA for 1126c9b
xarray/coding/times.py
@@ -595,7 +595,9 @@ def _numbers_to_timedelta(
595
# estimate fitting resolution for floating point values
596
# this iterates until all floats are fractionless or time_unit == "ns"
597
if flat_num.dtype.kind == "f" and time_unit != "ns":
598
- flat_num, new_time_unit = _check_higher_resolution(flat_num, time_unit)
+ flat_num, new_time_unit = _check_higher_resolution(
599
+ flat_num, cast(PDDatetimeUnitOptions, time_unit)
600
+ )
601
if time_unit != new_time_unit:
602
msg = (
603
f"Can't decode floating point {datatype} to {time_unit!r} without "
0 commit comments