8000 DOC: Fix malformed docstrings in ma. by takanori-pskq · Pull Request #16296 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: Fix malformed docstrings in ma. #16296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 11, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
DOC: fixing malformed documents
  • Loading branch information
takanori-pskq committed May 19, 2020
commit 6100bb76fff98a609daa5d73bc6382a9b2682b50
3 changes: 2 additions & 1 deletion numpy/ma/extras.py
4426
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ def getdoc(self):
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"\
locdoc = "\n\n Notes\n -----\n "\
"The function is applied to both the _data"\
" and the _mask, if any."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps instead we should use inspect.cleandoc(doc) before concatenating?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eric-wieser Thanks for reviewing. I think that's right, so I fixed the code.

return '\n'.join((sig, doc, locdoc))
return
Expand Down
0