summaryrefslogtreecommitdiff
path: root/doc/source/_templates
diff options
context:
space:
mode:
authorTakanori H <takanori17h@gmail.com>2020-11-04 20:13:39 +0900
committerGitHub <noreply@github.com>2020-11-04 13:13:39 +0200
commitb219f69db011a89e6c514ee487dc437f607c4d94 (patch)
treec9a6e1d3d42daca32b5c53737a0c5be22e44275a /doc/source/_templates
parent7f7d14a2b6e1078af25233bbdbc5d8533529fad8 (diff)
downloadnumpy-b219f69db011a89e6c514ee487dc437f607c4d94.tar.gz
DOC: Modify Templates (#17691)
* DOC: Modify Templates
Diffstat (limited to 'doc/source/_templates')
-rw-r--r--doc/source/_templates/autosummary/attribute.rst5
-rw-r--r--doc/source/_templates/autosummary/base.rst5
-rw-r--r--doc/source/_templates/autosummary/member.rst6
-rw-r--r--doc/source/_templates/autosummary/method.rst5
4 files changed, 16 insertions, 5 deletions
diff --git a/doc/source/_templates/autosummary/attribute.rst b/doc/source/_templates/autosummary/attribute.rst
index a6ed600ef..9e0eaa25f 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 0331154a7..91bfff9ba 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 f1f30e123..c0dcd5ed2 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 8abda8677..0dd226393 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. #}