@@ -5,7 +5,7 @@ hierarchy and load individual array chunks.
5
5
6
6
## Zarr hierarchy
7
7
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
9
9
** groups** . This hierarchy can be visualized in a manner similar to a file
10
10
system:
11
11
@@ -96,7 +96,7 @@ let arr = await zarr.open.v2(root.resolve("foo/bar"), { kind: "array" });
96
96
97
97
### Access a chunk
98
98
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
100
100
` Array.getChunk ` method. This feature is useful in applications where you want
101
101
to load chunks lazily (i.e. a tiled image viewer).
102
102
@@ -123,7 +123,7 @@ console.log(chunk);
123
123
- ` stride ` – the number of elements needed to advance one value along each
124
124
dimension
125
125
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
127
127
applications. However, for further processing or manipulations of the chunk
128
128
data, you can integrate with [ ` scijs/ndarray ` ] ( https://github.com/scijs/ndarray )
129
129
to convert it into an ` ndarray ` object.
@@ -214,7 +214,7 @@ to static type systems. **zarrita** leverages TypeScript's advanced typing
214
214
capabilities to extract and communicate Zarr ` data_type ` metadata across its
215
215
APIs.
216
216
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
218
218
at hand when working with Zarr via ** zarrita** . TypeScript assists in
219
219
covering edge cases, but (importantly) steps back once you've demonstrated data
220
220
correctness.
281
281
}
282
282
```
283
283
284
- Assert data types like this repeatedly can be cumbersome and repetative .
284
+ Assert data types like this repeatedly can be cumbersome and repetitive .
285
285
286
286
Instead, wouldn't it be convenient if you could verify the data type once, and
287
287
then TypeScript would automatically understand the expected data type for all
@@ -291,11 +291,11 @@ subsequent `getChunk` calls?
291
291
292
292
``` javascript
293
293
if (! arr .is (" int64" ) || ! arr .is (" uint64" )) {
294
- thow Error (" data type not supported!" );
294
+ throw Error (" data type not supported!" );
295
295
}
296
296
const chunk = await arr .getChunk ([0 , 0 ]);
297
297
// ^ Chunk<"int64" | "uint64">
298
- getBigIntValue (cunk .data , 0 ); // 0n
298
+ getBigIntValue (chunk .data , 0 ); // 0n
299
299
```
300
300
301
301
With this method, you've informed TypeScript about the possible data types for
0 commit comments