Repository navigation
DOC: Fix malformed docstrings in ma. - #16296
Conversation
| locdoc = "\n\n Notes\n -----\n "\ | ||
| "The function is applied to both the _data"\ | ||
| " and the _mask, if any." |
There was a problem hiding this comment.
Perhaps instead we should use inspect.cleandoc(doc) before concatenating?
There was a problem hiding this comment.
@eric-wieser Thanks for reviewing. I think that's right, so I fixed the code.
rossbar
left a comment
There was a problem hiding this comment.
Applying cleandoc is definitely an improvement. Just had a quick thought on the linebreaking in locdoc.
Co-authored-by: Ross Barnowski <[email protected]>
|
I found a function
So I think it's better to use |
|
Unfortunately |
|
Proof that this seems to be working as intended: https://13466-908607-gh.circle-artifacts.com/0/doc/build/html/reference/generated/numpy.ma.vstack.html |
|
Close/Reopen to clear CI failure |
|
Now |
Co-authored-by: Eric Wieser <[email protected]>
| 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 " |
There was a problem hiding this comment.
I wonder if as a follow-up we can set self.__wrapped__ = npfunc to avoid having to add a manual signature line.
|
Thanks @takanori-pskq |
Fixing documents for some functions in
numpy.ma(e.g.numpy.ma.vstack, https://numpy.org/devdocs/reference/generated/numpy.ma.vstack.html ). The documents is malformed because the indent of notes section is wrong.