Skip to content

Test for preserved dtype during datetime roundtrip #10159

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

Closed
wants to merge 1 commit into from

Conversation

maxrjones
Copy link
Contributor

The removal of _cast_to_dtype_if_safe() in https://github.com/pydata/xarray/pull/9498/files means that the dtype is not always preserved when roundtripping datetimes (xref zarr-developers/VirtualiZarr#492). This PR adds a test for that property. I'd be glad to add a fix in this PR as well, but first wanted to check if it was intentional to loosen the expectations around this property.

  • Closes #xxxx
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

@maxrjones
Copy link
Contributor Author

Ah sorry after reading #9498 more thoroughly it appears this was intentional. I'll close this since it looks like we'll instead need to cast the dtypes in VirtualiZarr

@maxrjones maxrjones closed this Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant