Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Masked arrays #127

Open
Open
@jdroenner

Description

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

        AltStyle によって変換されたページ (->オリジナル) /