-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[MNT]: Masked arrays with units #24733
Copy link
Copy link
Closed as not planned
Labels
Maintenancestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: units and array ducktypes
Metadata
Metadata
Assignees
Labels
Maintenancestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: units and array ducktypes
Summary
In #24545 it was identified that sometimes there is a problem with masked arrays and units. The solution in #24732 is rather straightforward, but it lead me to check the code for potential other locations.
Proposed fix
These are the locations I potentially found. It should probably be confirmed that it is a problem before modifying them (and those cases will be a good base for a test):
matplotlib/lib/matplotlib/collections.py
Lines 548 to 550 in cc85fb6
(Here one should probably take a complete look at the
set_offsets/get_offsetssetup and see if one can remove redundant calls. See a bit of the discussions in #24732)matplotlib/lib/matplotlib/collections.py
Line 2099 in cc85fb6
(Not sure if it makes sense here.)
A bunch in quiver, but not sure how well that supports units and masks. Similar with projections.
As discussed in #24732 (comment) it seems like
date2numdoes not support masked arrays, so making it do that is also a step in the right direction for this. (This is dealt with in #24734)