You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does not appear to be possible to set a scalar 'array'. The zarr specification does apparently allow this with shape=[] and the read case is handled in https://github.com/manzt/zarrita.js/blob/main/packages/indexing/src/get.ts with this code: return indexer.shape.length === 0 ? unwrap(out.data, 0) : out;
Looking a bit more into this, is this related to the fact that the only way to represent a typed value suitable for writing to the array is a TypedArray? Which of course is an array! Without a TypedScalar equivalent, it is not so straightforward to set a scalar value.
Setting a zarr array with a length 1 TypedArray works fine but is then represented in zarr as having shape [1].
It does not appear to be possible to set a scalar 'array'. The zarr specification does apparently allow this with shape=[] and the read case is handled in https://github.com/manzt/zarrita.js/blob/main/packages/indexing/src/get.ts with this code:
return indexer.shape.length === 0 ? unwrap(out.data, 0) : out;
However in https://github.com/manzt/zarrita.js/blob/main/packages/indexing/src/set.ts the zero length shape results in a zero length indexer which means nothing gets written to the array.
The text was updated successfully, but these errors were encountered: