Skip to content

Masked arrays #127

@jdroenner

Description

@jdroenner

Numpy supports masked arrays which is very useful for many use-cases. Are there any plans how a similar feature could be implemented for rust-ndarray?

My current idea would be to build a decorator which wraps an array and contains an additional mask object: struct MaskedArray<A, M>{ array: A, mask: M, }

The mask itself should be a trait (and/or enum?) to handle the following cases:

  • empty (no elements are masked)
  • hard mask: a bool array with the same shape as the data array (masking by coordinate)
  • no-data value (masking by value)
  • predicate (masking by value and/or coordinate)

The problem with this approach is that there is currently no array trait which is needed for the decorator pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy