Allow masked data in coords#6468
Conversation
Codecov Report✅ All 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.
trexfeathers
left a comment
There was a problem hiding this comment.
Thanks for looking into this @ukmo-ccbunney!
…th default fill type.
trexfeathers
left a comment
There was a problem hiding this comment.
Awesome work @ukmo-ccbunney. Just one change left I think
integration/merge/test_merge.py
trexfeathers
left a comment
There was a problem hiding this comment.
Superb! Thanks again 🚀
🚀 Pull Request
Closes: #3584
Description
Fixes two related issues:
Cellto 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: