Skip to content

Commit be8fe08

Browse files
authored
Merge pull request #2287 from AntoinePrv/doc-improvement-b
Documentation improvement Part #B
2 parents ddd2d6e + 07843f6 commit be8fe08

File tree

6 files changed

+485
-472
lines changed

6 files changed

+485
-472
lines changed

docs/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,10 @@ def setup(app):
3939
html_js_files = [
4040
'goatcounter.js'
4141
]
42+
43+
# Automatically link to numpy doc
44+
extensions += ['sphinx.ext.intersphinx']
45+
intersphinx_mapping = {
46+
"numpy": ("https://numpy.org/doc/stable/", None),
47+
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
48+
}

docs/source/histogram.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Basic usage
2828
* ``bins = 10``
2929
* ``mode = xt::histogram::automatic``
3030

31-
The behavior, in-, and output of ``histogram`` is similar to that of `numpy.histogram <https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html>`_ with that difference that the bin-edges are obtained by a separate function call:
31+
The behavior, in-, and output of ``histogram`` is similar to that of :any:`numpy.histogram` with that difference that the bin-edges are obtained by a separate function call:
3232

3333
.. code-block:: cpp
3434

docs/source/numpy-differences.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ array argument is a 0-D argument:
4747
Meshgrid
4848
--------
4949

50-
Numpy's version of meshgrid supports two modes: the 'xy' indexing and the 'ij' indexing.
50+
:any:`numpy.meshgrid` supports two modes: the 'xy' indexing and the 'ij' indexing.
5151

5252
The following code
5353

@@ -101,4 +101,4 @@ The reason is an optimization in xtensor, which is to set the strides to ``0`` i
101101
Array indices
102102
-------------
103103

104-
Array indices are in xtensor stored as a ``std::vector`` of array indices, whereby each entry corresponds to the array indices of one item. This results in a slightly different usage of ``xt::ravel_indices`` than of ``np.ravel_multi_index``.
104+
Array indices are in xtensor stored as a ``std::vector`` of array indices, whereby each entry corresponds to the array indices of one item. This results in a slightly different usage of ``xt::ravel_indices`` than of :any:`numpy.ravel_multi_index`.

0 commit comments

Comments
 (0)