Change doc config to remove duplicate module indices #379

wants to merge 1 commit into


None yet

4 participants


The numpy docs seem to have duplicate links to the Python Module Index. There are two modules links in the upper right hand corner of each page in the html docs.

This is caused by using both the numpydoc and the sphinx python domains which both generate the same index page.

These changes make the numpydoc domains override the sphinx domains and thus prevent the duplicate entries.


This pull request passes (merged 2891105c into fcdbcac).

NumPy member
pv commented Aug 10, 2012

Hmm, not completely sure about this, as the domain was different by intent, and this changes the behavior advertised in the README:

``numpydoc``: support for the Numpy docstring format in Sphinx, and add
the code description directives ``np:function``, ``np-c:function``, etc.
that support the Numpy docstring syntax.

If the only problem is the duplicate module index, there's probably a second way to remove it. However, also overriding the domains would make sense, so a behavior change could also be possible (I'm not sure if anyone uses the np: domain in the wild at all).


Sorry for missing that. I was mistaken about how the np domains were to be used so I don't think overriding is necessary.

The new changes keep the np and np-c domains but prevent the np domain from generating its own index. The np description directives will still be indexed in the py domain. The c domain doesn't generate a separate index so no changes are needed for the np-c domain.


This pull request passes (merged 172b14b into fcdbcac).


@pv, what do you think now?

NumPy member
pv commented May 1, 2013

This fix is correct, pushed in 0330cae

@pv pv closed this May 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment