Skip to content

Bug: zarrread fails for scalar datasets #120

@ehennestad

Description

@ehennestad

I am trying to read the attached dataset with zarrread, but get the following error:

Error using ZarrPy>readZarr (line 104)
Python Error: TypeError: 'int' object is not iterable

Error in zarrread (line 36)
data = zarrObj.read(options.Start, options.Count, options.Stride);

Error in io.backend.ZarrBackend/processDatasetInfo (line 31)
            datasetValue = zarrread(datasetPath);

The issue seems to be here:

slices = tuple(slice(start, end, stride) for start, end, stride in zip(starts, ends, strides))

Where that line fails if start, end and stride values are integers (as they are if the dataset is scalar).

Dataset: starting_time.zip

MATLAB Release: MATLAB R2024b

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions