pydata / pydata/xarray

Extend to_masked_array to support dask MaskedArrays

Open
#1,769 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

Following @shoyer's comment, it will be pretty straightforward to support creating dask masked arrays within the to_masked_array method. My thought would be that data arrays use dask, would be converted to dask masked arrays, rather than to numpy arrays as they are currently.

Two kinks:

  1. The dask masked array feature requires dask 0.15.3 or newer.
  2. I'm not sure how to test if an object is a dask.array.ma.MaskedArray (Dask doesn't have a MaskedArray class). @mrocklin - thoughts?

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.

Research direction

Start at the to_masked_array method and review how dask-backed data arrays are currently converted to NumPy arrays. The change is done when dask-backed arrays produce dask masked arrays, while accounting for the dask 0.15.3 requirement and confirming how to identify the masked-array representation.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.