Skip to content
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

Improve handling of dtype and NaT when encoding/decoding masked and packaged datetimes and timedeltas #10050

Merged
merged 18 commits into from
Mar 7, 2025

Conversation

kmuehlbauer
Copy link
Contributor

@kmuehlbauer kmuehlbauer commented Feb 14, 2025

Expecially for datetime/timedelta decoding we are still running into issue when partly decoding or issues when trying to roundtrip partially decoded data. Another issue is with keeping track of state for packed data / masked data. This PR solves this by adding state to CFMaskCoder/CFScaleOffsetCoder.

@kmuehlbauer kmuehlbauer marked this pull request as ready for review February 14, 2025 20:37
@spencerkclark
Copy link
Member

Thanks @kmuehlbauer—I'll try and take a look soon. It reminds me that maybe we should also resurrect #9498.

@kmuehlbauer
Copy link
Contributor Author

It reminds me that maybe we should also resurrect #9498.

Yes, great! Let me know, if I can be of any help with #9498.

Copy link
Member

@spencerkclark spencerkclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @kmuehlbauer—tricky issues. I think I generally follow the changes—a couple questions to start out.

@kmuehlbauer kmuehlbauer changed the title Fix issues when partially coding datetimes/timedeltas Improve handling of dtype and NaT when encoding/decoding masked and packaged datetimes and timedeltas Feb 25, 2025
@kmuehlbauer
Copy link
Contributor Author

@spencerkclark Thanks for highlighting these issues. I think I've followed your hints and suggestions to improve here.

Copy link
Member

@spencerkclark spencerkclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kmuehlbauer! This looks good to me now.

kmuehlbauer and others added 3 commits March 5, 2025 10:32
Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
…passing decode_times and decode_timedelta to CFMaskCoder and CFScaleOffsetCoder
@spencerkclark spencerkclark added the plan to merge Final call for comments label Mar 7, 2025
@dcherian dcherian merged commit 7a3a4c6 into pydata:main Mar 7, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to merge Final call for comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

netCDF encoding and decoding issues.
3 participants