Skip to content

Commit 5761d0e

Browse files
committed
WIP: Add xref to params in doc
1 parent 10ab79a commit 5761d0e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

build_tools/circle/build_doc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ conda create -n $CONDA_ENV_NAME --yes --quiet python="${PYTHON_VERSION:-*}" \
125125

126126
source activate testenv
127127
pip install "sphinx-gallery>=0.2,<0.3"
128-
pip install numpydoc==0.8
128+
pip install https://api.github.com/repos/larsoner/numpydoc/zipball/xref-param-type
129129

130130
# Build and install scikit-learn in dev mode
131131
python setup.py develop

doc/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@
4343
# this is needed for some reason...
4444
# see https://github.com/numpy/numpydoc/issues/69
4545
numpydoc_class_members_toctree = False
46-
46+
numpydoc_xref_param_type = True
47+
numpydoc_xref_aliases = {
48+
'integer': ':class:`python:int`',
49+
}
50+
numpydoc_xref_ignore = {
51+
'shape', 'n_features', 'or', 'optional', 'default',
52+
}
4753

4854
# For maths, use mathjax by default and svg if NO_MATHJAX env variable is set
4955
# (useful for viewing the doc offline)

0 commit comments

Comments
 (0)