Skip to content

ValueError on empty slice after resize() with fsspec store #1341

Description

@sbalmer

When using fsspec as store, the Array throws a ValueError when selecting an empty slice(), but only after resizing:

import fsspec
import zarr

fs = fsspec.filesystem('memory')
store = zarr.storage.FSStore('/test', fs=fs)
arr = zarr.create((0,), store=store)

# These print "[]" as expected
print(arr[0:0])
print(arr[1:1])

arr.resize((1,))

# These raise ValueError
print(arr[0:0])
print(arr[1:1])

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions