Skip to content

[Feature] Support for complex "fancy" indexing #16

Open
@manzt

Description

I wanted to move this from the docs to here.

In python, zarr supports the ability to index arrays using binary and integer masks:

import zarr

z = zarr.open("foo.zarr")
z.shape
# (5, 50, 50)

arr1 = z[[1,2,3],:,:]
arr1.shape
# (3, 50, 50)

arr2 = z[[False, True, False, True, True]])
arr1.shape == arr2.shape
# True

I am not sure what this would entail implementation-wise, but I'm guessing a new Indexer is needed. I would be interested in hearing what ideas you had in mind!

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions