(doc)
return _merge_paragraphs_within_section(titled_sections)
Splits the doc string into sections

    Each section is separated by empty line. Sections can start with headers or without. Each header follows NumPy
    style:

        Section Title
        -------------

    Other permitted characters can be used to underline section title

    :param doc: Docstring to be split into sections
    :return: List, sections of the doc. Each section is a tuple of strings (title, text)

    :seealso: NumPy style `example
        <https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html#example-numpy>`_
Splits the doc string into sections
Splits the doc string into sections
def split_in_sections(doc):
    """
    Splits the doc string into sections

    Each section is separated by empty line. Sections can start with headers or without. Each header follows NumPy
    style:

        Section Title
        -------------

    Other permitted characters can be used to underline section title

    :param doc: Docstring to be split into sections
    :return: List, sections of the doc. Each section is a tuple of strings (title, text)

    :seealso: NumPy style `example
        <https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html#example-numpy>`_
    """
    doc = reindent(doc, 0)
    sections = doc.split('\n\n')  # Sections are separated by empty lines
    titled_sections = []

    while len(sections) > 0:
        title, text = split_title(sections[0])
        sections.pop(0)
        titled_sections.append((title, text))

    return _merge_paragraphs_within_section(titled_sections)
def split_in_sections ( doc ) : doc = reindent ( doc , 0 ) sections = doc . split ( '\n\n' ) # Sections are separated by empty lines titled_sections = [ ] while len ( sections ) > 0 : title , text = split_title ( sections [ 0 ] ) sections . pop ( 0 ) titled_sections . append ( ( title , text ) ) return _merge_paragraphs_within_section ( titled_sections )