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
But Zarr data types and Numpy data types are also very different in one key respect:
17
-
Zarr arrays are designed to be persisted to storage and later read, possibly by Zarr implementations in different programming languages.
18
-
So in addition to defining a memory layout for array elements, each Zarr data type defines a procedure for
16
+
But Zarr data types and Numpy data types are also very different:
17
+
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
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.
20
+
array metadata, and these serialization procedures depend on the Zarr format.
21
21
22
22
Data types in Zarr version 2
23
23
-----------------------------
24
24
25
25
Version 2 of the Zarr format defined its data types relative to `Numpy's data types <https://numpy.org/doc/2.1/reference/arrays.dtypes.html#data-type-objects-dtype>`_, and added a few non-Numpy data types as well.
26
-
Thus the JSON identifer for a Numpy-compatible data type is just the Numpy ``str`` attribute of that dtype:
26
+
Thus the JSON identifier for a Numpy-compatible data type is just the Numpy ``str`` attribute of that dtype:
27
27
28
28
>>> import zarr
29
29
>>> import numpy as np
@@ -113,16 +113,6 @@ data types, additional checks are needed -- in Numpy "structured" data types and
113
113
A ``DTypeWrapper`` that wraps Numpy structured data types must do additional checks to ensure that the input ``dtype`` is actually a structured data type.
114
114
If input validation succeeds, this method will call ``_from_dtype_unsafe``.
0 commit comments