-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
units = 'days' leads to timedelta64 for data variable #2085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is expected behavior, but you're not the first person to complain, and it seems like there is a consensus around changing it: #1621 I'm going to close this issue in favor of the other one. |
Thanks & sorry I didn't see the other issue. |
@ocefpaf I suggested one option in #1621 (comment), issuing a FutureWarning so anyone reliant on this behavior is not surprised. (We could also add an option for opting into the behavior early if you like, e.g., |
Thanks! I'll look into those and should have something by next week. |
Code Sample
Problem description
Returns:
Expected Output
I would expect type float for all of them. Or is this expected behaviour?
I have a dataset that reports 'consecutive dry days' and the dataset creator correctly set the units of the data to 'days', but I don't want this to be decoded (but the time axis should)....
Output of
xr.show_versions()
xarray: 0.10.2+dev6.g9261601
pandas: 0.22.0
numpy: 1.14.2
scipy: 1.0.1
netCDF4: 1.3.1
h5netcdf: 0.5.0
h5py: 2.7.1
Nio: None
zarr: None
bottleneck: 1.2.1
cyordereddict: 1.0.0
dask: 0.17.2
distributed: 1.21.3
matplotlib: 2.2.2
cartopy: None
seaborn: None
setuptools: 39.0.1
pip: 9.0.2
conda: None
pytest: 3.4.2
IPython: 6.2.1
sphinx: None
The text was updated successfully, but these errors were encountered: