Skip to content

Construct ndarray/MaskedArray subclasses that can be re-used throughout astropy? #1857

Closed

Description

@mhvk

In #1852, I suggested

... the above made me wonder whether for internal use we should simply make our own MaskedArray subclass in which we override some of the behaviour; this helps make sure we do not have to take the peculiarities into account in every subclass we construct (the comments in MaskedColumn show this has been a fun aspect...), and will also make it easier to send PRs to numpy (I saw @taldcroft had a few, and I've been making some myself as well).

Aside: from my last PR it is clear the numpy people would like to move MaskedArray to the new array_ufunc functionality (which will be a big benefit for Quantity as well). This is a chance to help get the implementation right.

The ding-ding-ding in #1471 made me feel this probably is something we should do -- hence I decided to make it its own issue.

EDIT (2014-01-17): Possibly, we should even have our own ndarray subclass, as this would help with, e.g., pickling of additional attributes (see #1961).

Activity

  1. taldcroft commented on Dec 2, 2013

    @taldcroft
    Member

    @mhvk - I'm starting to see some merit in this idea!

  2. astrofrog commented on Mar 15, 2014

    @astrofrog
    Member

    @mhvk - sorry that I didn't get to reply to this sooner. I think this would be a great idea. Do you want to give it a shot to see what this would look like? Maybe this should go in astropy.utils, possibly astropy.utils.numpy. What do you think?

  3. added this to the v0.4.0 milestone on Mar 15, 2014
  4. modified the milestones: v1.0.0, v0.4.0 on May 8, 2014
  5. removed this from the v1.0.0 milestone on Jan 13, 2015
  6. mhvk commented on Jan 13, 2015

    @mhvk
    ContributorAuthor

    Milestone cleared here, as I think this is more of a wish-list feature. I did have a fair start (see https://github.com/mhvk/astropy/compare/util-masked-array, especially the test cases), but lost steam, not helped by not really needing the masked arrays myself...

  7. nstarman commented on May 20, 2021

    @nstarman
    Member

    @mhvk, close this issue?

  8. mhvk commented on May 20, 2021

    @mhvk
    ContributorAuthor

    yes, superseded by #11127

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