Skip to content

Commit becd77c

Browse files
j08lueshoyer
authored andcommitted
test decoding num_dates in float types (#1863)
1 parent 55257b8 commit becd77c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

xarray/tests/test_coding_times.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def test_cf_datetime(self):
2727
import netCDF4 as nc4
2828
for num_dates, units in [
2929
(np.arange(10), 'days since 2000-01-01'),
30+
(np.arange(10).astype('float64'), 'days since 2000-01-01'),
31+
(np.arange(10).astype('float32'), 'days since 2000-01-01'),
3032
(np.arange(10).reshape(2, 5), 'days since 2000-01-01'),
3133
(12300 + np.arange(5), 'hours since 1680-01-01 00:00:00'),
3234
# here we add a couple minor formatting errors to test

0 commit comments

Comments
 (0)