Skip to content

Commit

Permalink
Merge pull request #2287 from AntoinePrv/doc-improvement-b
Browse files Browse the repository at this point in the history
Documentation improvement Part #B
  • Loading branch information
JohanMabille authored Jan 25, 2021
2 parents ddd2d6e + 07843f6 commit be8fe08
Show file tree
Hide file tree
Showing 6 changed files with 485 additions and 472 deletions.
7 changes: 7 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ def setup(app):
html_js_files = [
'goatcounter.js'
]

# Automatically link to numpy doc
extensions += ['sphinx.ext.intersphinx']
intersphinx_mapping = {
"numpy": ("https://numpy.org/doc/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
}
2 changes: 1 addition & 1 deletion docs/source/histogram.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Basic usage
* ``bins = 10``
* ``mode = xt::histogram::automatic``

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:
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:

.. code-block:: cpp
Expand Down
4 changes: 2 additions & 2 deletions docs/source/numpy-differences.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ array argument is a 0-D argument:
Meshgrid
--------

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

The following code

Expand Down Expand Up @@ -101,4 +101,4 @@ The reason is an optimization in xtensor, which is to set the strides to ``0`` i
Array indices
-------------

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``.
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`.
Loading

0 comments on commit be8fe08

Please sign in to comment.