summaryrefslogtreecommitdiff
path: root/numpy/ma/extras.py
diff options
context:
space:
mode:
authorTakanori H <takanori17h@gmail.com>2020-06-11 21:41:32 +0900
committerGitHub <noreply@github.com>2020-06-11 15:41:32 +0300
commit02d66ecd80a1851c3b206f4d778687b38c9d2c36 (patch)
treed163c8ecc64599d0515a719ca0949690a69f8145 /numpy/ma/extras.py
parent68ebc2bad1ad6a99e9939eff205a1a6d936cf4fd (diff)
downloadnumpy-02d66ecd80a1851c3b206f4d778687b38c9d2c36.tar.gz
DOC: Fix malformed docstrings in ma. (#16296)
* DOC: fixing malformed documents Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Diffstat (limited to 'numpy/ma/extras.py')
-rw-r--r--numpy/ma/extras.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py
index f86ebf551..8ede29da1 100644
--- a/numpy/ma/extras.py
+++ b/numpy/ma/extras.py
@@ -244,11 +244,6 @@ class _fromnxfunction:
the new masked array version of the function. A note on application
of the function to the mask is appended.
- .. warning::
- If the function docstring already contained a Notes section, the
- new docstring will have two Notes sections instead of appending a note
- to the existing section.
-
Parameters
----------
None
@@ -258,9 +253,9 @@ class _fromnxfunction:
doc = getattr(npfunc, '__doc__', None)
if doc:
sig = self.__name__ + ma.get_object_signature(npfunc)
- locdoc = "Notes\n-----\nThe function is applied to both the _data"\
- " and the _mask, if any."
- return '\n'.join((sig, doc, locdoc))
+ doc = ma.doc_note(doc, "The function is applied to both the _data "
+ "and the _mask, if any.")
+ return '\n\n'.join((sig, doc))
return
def __call__(self, *args, **params):