Skip to content

Check behavior when using out-of-bound value for the "stride" parameter #113

@jm9176

Description

@jm9176

If an out-of-bound value is used for the start and count parameter, then I get a hard error. However, in case of the stride parameter, an empty double is returned. Could you please check the behavior?

>> zarrcreate('prt_grp/myarr/',[10 10]);
>> zarrwrite('prt_grp/myarr/',ones([10 10]));
>> zarrread('prt_grp/myarr/',Start=[100 100])
Error using ZarrPy>readZarr (line 107)
Python Error: IndexError: Computing interval slice for dimension 0: (99, 9) do not specify a valid closed index
interval [source
locations='tensorstore/index_interval.cc:358\ntensorstore/index_interval.cc:401\ntensorstore/index_space/internal/numpy_indexing_spec.cc:499\ntensorstore/index_space/internal/numpy_indexing_spec.cc:499\ntensorstore/index_space.h:438']

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

>> zarrread('prt_grp/myarr/',Stride=[100 100])

ans =

     []

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions