Skip to content

Commit 251d8d4

Browse files
committed
Docs update link to stable numpy docs using intersphinx
Not done with install page as it does not have a target.
1 parent 473576f commit 251d8d4

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

docs/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
'sphinx.ext.autodoc',
4343
'sphinx.ext.autosummary',
4444
'sphinx.ext.viewcode',
45+
'sphinx.ext.intersphinx',
4546
'numpydoc',
4647
'sphinx_issues',
4748
]
@@ -306,4 +307,7 @@ def setup(app):
306307

307308

308309
# Example configuration for intersphinx: refer to the Python standard library.
309-
intersphinx_mapping = {'https://docs.python.org/': None}
310+
# use in refs e.g:
311+
# :ref:`comparison manual <python:comparisons>`
312+
intersphinx_mapping = { 'python':('https://docs.python.org/', None),
313+
'numpy': ('https://numpy.org/doc/stable/', None)}

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Installation
2929
------------
3030

3131
Zarr depends on NumPy. It is generally best to `install NumPy
32-
<http://docs.scipy.org/doc/numpy/user/install.html>`_ first using whatever method is most
32+
<https://numpy.org/doc/stable/user/install.html>`_ first using whatever method is most
3333
appropriate for you operating system and Python distribution. Other dependencies should be
3434
installed automatically if using one of the installation methods below.
3535

docs/spec/v1.rst

Lines changed: 2 additions & 2 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-
<http://docs.scipy.org/doc/numpy/reference/arrays.interface.html>`_. The
111+
<numpy:arrays.interface>`_. 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-
<http://docs.scipy.org/doc/numpy/reference/arrays.interface.html#>`_.
122+
<numpy:arrays.interface>`_.
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'.

docs/spec/v2.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ Data type encoding
117117
~~~~~~~~~~~~~~~~~~
118118

119119
Simple data types are encoded within the array metadata as a string,
120-
following the `NumPy array protocol type string (typestr) format
121-
<http://docs.scipy.org/doc/numpy/reference/arrays.interface.html>`_. The format
120+
following the :ref:`NumPy array protocol type string (typestr) format
121+
<numpy:arrays.interface>`. The format
122122
consists of 3 parts:
123123

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

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

143143
Structured data types (i.e., with multiple named fields) are encoded
144-
as a list of lists, following `NumPy array protocol type descriptions
144+
as a list of lists, following :ref:`NumPy array protocol type descriptions
145145
(descr)
146-
<http://docs.scipy.org/doc/numpy/reference/arrays.interface.html#>`_. Each
146+
<numpy:arrays.interface>`. Each
147147
sub-list has the form ``[fieldname, datatype, shape]`` where ``shape``
148148
is optional. ``fieldname`` is a string, ``datatype`` is a string
149149
specifying a simple data type (see above), and ``shape`` is a list of

0 commit comments

Comments
 (0)