Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build_tools/circle/build_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ conda create -n $CONDA_ENV_NAME --yes --quiet python="${PYTHON_VERSION:-*}" nump

source activate testenv
pip install sphinx-gallery
# Use numpydoc master (for now)
pip install git+https://github.com/numpy/numpydoc
# Use numpydoc PR: https://github.com/numpy/numpydoc/pull/150
pip install https://github.com/has2k1/numpydoc/archive/xref-param-type.zip

# Build and install scikit-learn in dev mode
python setup.py develop
Expand Down
18 changes: 18 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,21 @@ def setup(app):
u'https://github.com/scikit-learn/'
'scikit-learn/blob/{revision}/'
'{package}/{path}#L{lineno}')


numpydoc_xref_param_type = True


numpydoc_xref_aliases = {
# python
'sequence': ':term:`python:sequence`',
'iterable': ':term:`python:iterable`',
'string': 'str',
# numpy
'array': '~numpy.array',
'dtype': '~numpy.dtype',
'ndarray': '~numpy.ndarray',
'matrix': 'numpy.matrix',
'array-like': ':term:`numpy:array_like`',
'array_like': ':term:`numpy:array_like`',
}