@@ -5,7 +5,7 @@ hierarchy and load individual array chunks.
55
66## Zarr hierarchy
77
8- A Zarr dataset is structured as a hierarchy, composed up of ** arrays** and
8+ A Zarr dataset is structured as a hierarchy, composed of ** arrays** and
99** groups** . This hierarchy can be visualized in a manner similar to a file
1010system:
1111
@@ -96,7 +96,7 @@ let arr = await zarr.open.v2(root.resolve("foo/bar"), { kind: "array" });
9696
9797### Access a chunk
9898
99- To load individual ** array** chunks on demand base on their key, use the
99+ To load individual ** array** chunks on demand based on their key, use the
100100` Array.getChunk ` method. This feature is useful in applications where you want
101101to load chunks lazily (i.e. a tiled image viewer).
102102
@@ -123,7 +123,7 @@ console.log(chunk);
123123- ` stride ` – the number of elements needed to advance one value along each
124124 dimension
125125
126- This is the minimal representation of the chunk data is often suitable for many
126+ This minimal representation of the chunk data is often suitable for many
127127applications. However, for further processing or manipulations of the chunk
128128data, you can integrate with [ ` scijs/ndarray ` ] ( https://github.com/scijs/ndarray )
129129to convert it into an ` ndarray ` object.
@@ -214,7 +214,7 @@ to static type systems. **zarrita** leverages TypeScript's advanced typing
214214capabilities to extract and communicate Zarr ` data_type ` metadata across its
215215APIs.
216216
217- In essense , you (moreover your editor) is always informed about the data types
217+ In essence , you (moreover your editor) is always informed about the data types
218218at hand when working with Zarr via ** zarrita** . TypeScript assists in
219219covering edge cases, but (importantly) steps back once you've demonstrated data
220220correctness.
281281}
282282```
283283
284- Assert data types like this repeatedly can be cumbersome and repetative .
284+ Assert data types like this repeatedly can be cumbersome and repetitive .
285285
286286Instead, wouldn't it be convenient if you could verify the data type once, and
287287then TypeScript would automatically understand the expected data type for all
@@ -291,11 +291,11 @@ subsequent `getChunk` calls?
291291
292292``` javascript
293293if (! arr .is (" int64" ) || ! arr .is (" uint64" )) {
294- thow Error (" data type not supported!" );
294+ throw Error (" data type not supported!" );
295295}
296296const chunk = await arr .getChunk ([0 , 0 ]);
297297 // ^ Chunk<"int64" | "uint64">
298- getBigIntValue (cunk .data , 0 ); // 0n
298+ getBigIntValue (chunk .data , 0 ); // 0n
299299```
300300
301301With this method, you've informed TypeScript about the possible data types for
0 commit comments