Skip to content

Commit 706e6b6

Browse files
committed
tweak docs
1 parent 7dfcd0f commit 706e6b6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/user-guide/data_types.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ Zarr's data type model
77
Every Zarr array has a "data type", which defines the meaning and physical layout of the
88
array's elements. Zarr is heavily influenced by `NumPy <https://numpy.org/doc/stable/>`_, and
99
Zarr-Python supports creating arrays with Numpy data types::
10-
>>> import zarr
11-
>>> import numpy as np
12-
>>> zarr.create_array(store={}, shape=(10,), dtype=np.dtype('uint8'))
13-
>>> z
14-
<Array memory://126225407345920 shape=(10,) dtype=uint8>
1510

16-
But Zarr data types and Numpy data types are also very different:
11+
>>> import zarr
12+
>>> import numpy as np
13+
>>> zarr.create_array(store={}, shape=(10,), dtype=np.dtype('uint8'))
14+
>>> z
15+
<Array memory://126225407345920 shape=(10,) dtype=uint8>
16+
1717
Unlike Numpy arrays, Zarr arrays are designed to be persisted to storage and read by Zarr implementations in different programming languages.
18-
To ensure that the data type can be interpreted correctly when reading an array, each Zarr data type defines a procedure for
19-
reading and writing that data type to Zarr array metadata, and also reading and writing **instances** of that data type to
20-
array metadata, and these serialization procedures depend on the Zarr format.
18+
This means Zarr data types must be interpreted correctly when clients read an array. So each Zarr data type defines a procedure for
19+
encoding / decoding that data type to / from Zarr array metadata, and also encoding / decoding **instances** of that data type to / from
20+
array metadata. These serialization procedures depend on the Zarr format.
2121

2222
Data types in Zarr version 2
2323
-----------------------------
@@ -56,7 +56,7 @@ Zarr-Python supports two different Zarr formats, and those two formats specify d
5656
data types in Zarr version 2 are encoded as Numpy-compatible strings, while data types in Zarr version 3 are encoded as either strings or ``JSON`` objects,
5757
and the Zarr V3 data types don't have any associated endianness information, unlike Zarr V2 data types.
5858

59-
If that wasn't enough, we want Zarr-Python to support data types beyond what's available in Numpy. So it's crucial that we have a
59+
We also want Zarr-Python to support data types beyond what's available in Numpy. So it's crucial that we have a
6060
model of array data types that can adapt to the differences between Zarr V2 and V3 and doesn't over-fit to Numpy.
6161

6262
Here are the operations we need to perform on data types in Zarr-Python:

0 commit comments

Comments
 (0)