scverse / scverse/spatialdata

Do not convert arrays to dask

Open
#243 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

Currently, arrays for labels, images, etc. are required to be dask arrays. This makes sense when loading data from a store, but doesn't make sense to me when creating in memory (e.g. spatialdata.models.Labels2DModel.parse(np.array([[0, 0], [0, 0]]), dims=["y", "x"]))

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 spatialdata.models.Labels2DModel.parse and trace how the provided NumPy array is handled when creating an in-memory model. Confirm the desired behavior for in-memory arrays versus arrays loaded from a store, then verify that the relevant model behavior and existing tests preserve the expected array type.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.