← Back
Editing: _docscrape.cpython-311.pyc
� d�cPT � �& � d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m Z mZ ddlZddl Z d� Z G d� de� � Z G d � d e� � Z edg d�� � Z G d � de� � Zdd�Zd� Zdd�Z G d� de� � Z G d� de� � ZdS )z=Extract reference documentation from the NumPy source tree. � N)�warn)� namedtuple)�Callable�Mappingc �� � | r9| d � � � s| d= | r| d � � � �| r9| d � � � s| d= | r| d � � � �| S )z<Remove leading and trailing blank lines from a list of linesr �����strip)�ls �7/usr/lib/python3/dist-packages/scipy/_lib/_docscrape.py�strip_blank_linesr s� � � � �A�a�D�J�J�L�L� � �a�D� � �A�a�D�J�J�L�L� � � �A�b�E�K�K�M�M� � �b�E� � �A�b�E�K�K�M�M� ��H� c �V � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zdd�Z d � ZdS )�Readerz!A line-based string reader. c � � t |t � � r|| _ n|� d� � | _ | � � � dS )zs Parameters ---------- data : str String with lines separated by '\n'. � N)� isinstance�list�_str�split�reset)�self�datas r �__init__zReader.__init__ sC � � �d�D�!�!� )��D�I�I�� � �4�(�(�D�I�� � �����r c � � | j | S �N)r �r �ns r �__getitem__zReader.__getitem__, s � ��y��|�r c � � d| _ d S )Nr )�_l�r s r r zReader.reset/ s � �����r c �l � | � � � s| | j }| xj dz c_ |S dS )N� � )�eofr! )r �outs r �readzReader.read2 s6 � ��x�x�z�z� ��t�w�-�C��G�G�q�L�G�G��J��2r c �x � | | j d � D ])}|� � � r d S | xj dz c_ �*d S �Nr$ )r! r )r r s r �seek_next_non_empty_linezReader.seek_next_non_empty_line: sM � ��d�g�h�h�� � �A��w�w�y�y� �������1����� � r c �<