Skip to content

np.ma.core.doc_note does not work correctly for indented docstrings #16309

Closed

Description

@eric-wieser

Given:

class C:
    def method(self):
        """ This docstring

        Has multiple lines

        And notes

        Notes
        -----
        original note
        """

np.ma.core.doc_note gives:

>>> print(np.ma.core.doc_note(Bar.foo.__doc__, "badly indented note"))
 This docstring

        Has multiple lines

        And notes

    Notes
    -----
    badly indented note

        original note

which has bad indents.

This isn't public API, but it's possible we're being caught out by this internally somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions