-
Notifications
You must be signed in to change notification settings - Fork 292
Allow masked data in coords #6468
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6468 +/- ##
=======================================
Coverage 89.81% 89.82%
=======================================
Files 90 90
Lines 23761 23782 +21
Branches 4422 4427 +5
=======================================
+ Hits 21340 21361 +21
Misses 1672 1672
Partials 749 749 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Mostly working, but outstanding problem with loading a scalar coord with a single masked value. I am not sure yet why this works for an array of all masked values but not a scalar masked value... |
looses the original dtype.
Commit dff7cb8 addresses issue where the original The |
There is only one small snag now w.r.t. the # Scalar coord points now have correct dtype
coord = cube.coord('realization')
coord.points
>> masked_array(data=[--],
>> mask=[ True],
>> fill_value=np.int64(999999),
>> dtype=int16)
# ... but accessing them via the `cell` method still looses it:
coord.cell(0).point
>> masked
coord.cell(0).point.dtype
>> dtype('float64') # <-- This is the dtype of np.ma.masked, not the coord |
issue with numpy warnings about NaNs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this @ukmo-ccbunney!
…th default fill type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @ukmo-ccbunney. Just one change left I think
integration/merge/test_merge.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superb! Thanks again 🚀
🚀 Pull Request
Closes: #3584
Description
Fixes two related issues:
Cell
to be hashedWhilst adding test, the following files have been converted from unittest to pytest:
Consult Iris pull request check list
Add any of the below labels to trigger actions on this PR: