FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[MNT]: Masked arrays with units · Issue #24733 · matplotlib/matplotlib · GitHub

Repository navigation

[MNT]: Masked arrays with units #24733

Closed as not planned
Closed as not planned

Description

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):

self._offsets = np.column_stack(
(np.asarray(self.convert_xunits(offsets[:, 0]), float),
np.asarray(self.convert_yunits(offsets[:, 1]), float)))

(Here one should probably take a complete look at the set_offsets/get_offsets setup and see if one can remove redundant calls. See a bit of the discussions in #24732)

offsets = np.column_stack([xs, ys])

(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 date2num does 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)

Activity

  1. chahak13 commented on Dec 17, 2022

    Contributor

    @oscargus I took a shot at fixing the support for masked arrays in set_offsets in collections (#24757). Regarding the get_offsets/set_offsets setup, on a quick glance, the get_datalim function is one place that uses self._offsets being None to perform some logic so that will also have changes based on if we decide to change anything about self._offsets.

  2. github-actions commented on Feb 9, 2026

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  3. added
    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.
    on Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL