diff --git a/doc/source/_templates/autosummary/attribute.rst b/doc/source/_templates/autosummary/attribute.rst index a6ed600ef7b9..9e0eaa25fdfb 100644 --- a/doc/source/_templates/autosummary/attribute.rst +++ b/doc/source/_templates/autosummary/attribute.rst @@ -6,5 +6,8 @@ attribute -.. auto{{ objtype }}:: {{ objname }} +.. auto{{ objtype }}:: {{ fullname | replace("numpy.", "numpy::") }} +{# In the fullname (e.g. `numpy.ma.MaskedArray.methodname`), the module name +is ambiguous. Using a `::` separator (e.g. `numpy::ma.MaskedArray.methodname`) +specifies `numpy` as the module name. #} diff --git a/doc/source/_templates/autosummary/base.rst b/doc/source/_templates/autosummary/base.rst index 0331154a7cf6..91bfff9ba870 100644 --- a/doc/source/_templates/autosummary/base.rst +++ b/doc/source/_templates/autosummary/base.rst @@ -10,5 +10,8 @@ property {% endif %} -.. auto{{ objtype }}:: {{ objname }} +.. auto{{ objtype }}:: {{ fullname | replace("numpy.", "numpy::") }} +{# In the fullname (e.g. `numpy.ma.MaskedArray.methodname`), the module name +is ambiguous. Using a `::` separator (e.g. `numpy::ma.MaskedArray.methodname`) +specifies `numpy` as the module name. #} diff --git a/doc/source/_templates/autosummary/member.rst b/doc/source/_templates/autosummary/member.rst index f1f30e12385e..c0dcd5ed2676 100644 --- a/doc/source/_templates/autosummary/member.rst +++ b/doc/source/_templates/autosummary/member.rst @@ -6,6 +6,8 @@ member -.. auto{{ objtype }}:: {{ objname }} - +.. auto{{ objtype }}:: {{ fullname | replace("numpy.", "numpy::") }} +{# In the fullname (e.g. `numpy.ma.MaskedArray.methodname`), the module name +is ambiguous. Using a `::` separator (e.g. `numpy::ma.MaskedArray.methodname`) +specifies `numpy` as the module name. #} diff --git a/doc/source/_templates/autosummary/method.rst b/doc/source/_templates/autosummary/method.rst index 8abda8677cf4..0dd2263932c6 100644 --- a/doc/source/_templates/autosummary/method.rst +++ b/doc/source/_templates/autosummary/method.rst @@ -6,5 +6,8 @@ method -.. auto{{ objtype }}:: {{ objname }} +.. auto{{ objtype }}:: {{ fullname | replace("numpy.", "numpy::") }} +{# In the fullname (e.g. `numpy.ma.MaskedArray.methodname`), the module name +is ambiguous. Using a `::` separator (e.g. `numpy::ma.MaskedArray.methodname`) +specifies `numpy` as the module name. #}