Remove explicit use of Masked Array types

Open
#894 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
numpy, python
Domain
data

Research direction

Start by locating the rebin entry point and tracing its use of np.ma.masked_array and the dask equivalent. Compare the current masked-array handling with the proposed two-array approach, including how other backends such as CuPy could be supported; done means rebin no longer hard-codes NumPy and Dask masked-array types while preserving masking behavior.

Written by the indexing model from the issue text.

Description

Provide a general description of the issue or problem.

It's unclear to me why we explicitly use np.ma.masked_array and the dask equivalent. The problem with doing this is we are hard-coding the masked array handling in rebin to be numpy and dask only, excluding other things such as cupy.

We could just carry around two arrays, one for the data and one for the array? @DanRyanIrish

Dominant language
Python
Stars
49
Forks
56
Avg merge
5h 54m
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sunpy/ndcube

All issues in sunpy/ndcube

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.