Skip to content

Commit 8052755

Browse files
Apply suggestions from code review
Co-authored-by: Sanket Verma <[email protected]>
1 parent 5dc8857 commit 8052755

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

docs/v1/v1.0.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Data type encoding
108108
Simple data types are encoded within the array metadata resource as a
109109
string, following the `NumPy array protocol type string (typestr)
110110
format
111-
<numpy:arrays.interface>`_. The
111+
<https://numpy.org/doc/stable/reference/arrays.interface.html>`_. The
112112
format consists of 3 parts: a character describing the byteorder of
113113
the data (``<``: little-endian, ``>``: big-endian, ``|``:
114114
not-relevant), a character code giving the basic type of the array,
@@ -119,7 +119,7 @@ order MUST be specified. E.g., ``"<f8"``, ``">i4"``, ``"|b1"`` and
119119
Structure data types (i.e., with multiple named fields) are encoded as
120120
a list of two-element lists, following `NumPy array protocol type
121121
descriptions (descr)
122-
<numpy:arrays.interface>`_.
122+
<https://numpy.org/doc/stable/reference/arrays.interface.html>`_.
123123
For example, the JSON list ``[["r", "|u1"], ["g", "|u1"], ["b",
124124
"|u1"]]`` defines a data type composed of three single-byte unsigned
125125
integers labelled 'r', 'g' and 'b'.
@@ -133,7 +133,7 @@ of bytes comprising the compressed chunk data. No header is added to
133133
the compressed bytes or any other modification made. The internal
134134
structure of the compressed bytes will depend on which primary
135135
compressor was used. For example, the `Blosc compressor
136-
<https://github.com/Blosc/c-blosc/blob/main/README_HEADER.rst>`_
136+
<https://github.com/Blosc/c-blosc/blob/main/README_CHUNK_FORMAT.rst>`_
137137
produces a sequence of bytes that begins with a 16-byte header
138138
followed by compressed data.
139139

docs/v2/v2.0.rst

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ Data type encoding
128128
~~~~~~~~~~~~~~~~~~
129129

130130
Simple data types are encoded within the array metadata as a string,
131-
following the :ref:`NumPy array protocol type string (typestr) format
132-
<numpy:arrays.interface>`. The format
131+
following the `NumPy array protocol type string (typestr) format <https://numpy.org/doc/stable/reference/arrays.interface.html#the-array-interface-protocol>`_. The format
133132
consists of 3 parts:
134133

135134
* One character describing the byteorder of the data (``"<"``: little-endian;
@@ -147,14 +146,12 @@ The byte order MUST be specified. E.g., ``"<f8"``, ``">i4"``, ``"|b1"`` and
147146

148147
For datetime64 ("M") and timedelta64 ("m") data types, these MUST also include the
149148
units within square brackets. A list of valid units and their definitions are given in
150-
the :ref:`NumPy documentation on Datetimes and Timedeltas
151-
<numpy:arrays.dtypes.dateunits>`.
149+
the `NumPy documentation on Datetimes and Timedeltas <https://numpy.org/doc/stable/reference/arrays.datetime.html#datetime-units>`_.
152150
For example, ``"<M8[ns]"`` specifies a datetime64 data type with nanosecond time units.
153151

154152
Structured data types (i.e., with multiple named fields) are encoded
155-
as a list of lists, following :ref:`NumPy array protocol type descriptions
156-
(descr)
157-
<numpy:arrays.interface>`. Each
153+
as a list of lists, following `NumPy array protocol type descriptions
154+
(descr) <https://numpy.org/doc/stable/reference/arrays.interface.html#the-array-interface-protocol>`_. Each
158155
sub-list has the form ``[fieldname, datatype, shape]`` where ``shape``
159156
is optional. ``fieldname`` is a string, ``datatype`` is a string
160157
specifying a simple data type (see above), and ``shape`` is a list of
@@ -532,13 +529,13 @@ initially published to clarify ambiguities and add some missing information.
532529

533530
* The specification now describes how bytes fill values should be encoded and
534531
decoded for arrays with a fixed-length byte string data type (`#165
535-
<https://github.com/zarr-developers/zarr-python/issue/165/>`_, `#176
536-
<https://github.com/zarr-developers/zarr-python/issue/176/>`_).
532+
<https://github.com/zarr-developers/zarr-python/issues/165/>`_, `#176
533+
<https://github.com/zarr-developers/zarr-python/issues/176/>`_).
537534

538535
* The specification now clarifies that units must be specified for datetime64 and
539536
timedelta64 data types (`#85
540-
<https://github.com/zarr-developers/zarr-python/issue/85/>`_, `#215
541-
<https://github.com/zarr-developers/zarr-python/issue/215/>`_).
537+
<https://github.com/zarr-developers/zarr-python/issues/85/>`_, `#215
538+
<https://github.com/zarr-developers/zarr-python/issues/215/>`_).
542539

543540
* The specification now clarifies that the '.zattrs' key does not have to be present for
544541
either arrays or groups, and if absent then custom attributes should be treated as
@@ -547,7 +544,7 @@ initially published to clarify ambiguities and add some missing information.
547544
* The specification now describes how structured datatypes with
548545
subarray shapes and/or with nested structured data types are encoded
549546
in array metadata (`#111
550-
<https://github.com/zarr-developers/zarr-python/issue/111/>`_, `#296
547+
<https://github.com/zarr-developers/zarr-python/issues/111/>`_, `#296
551548
<https://github.com/zarr-developers/zarr-python/issues/296/>`_).
552549

553550
* Clarified the key/value pairs of custom attributes as "arbitrary" rather than

0 commit comments

Comments
 (0)