a
    zn„fN  ã                   @  s*   d Z ddlmZ ddlZG dd„ dƒZdS )z2
This module defines the behaviors of ``TGraph``.
é    )ÚannotationsNc                   @  s"   e Zd ZdZdd„ Zddd„ZdS )	ÚTGraphz>
    Behaviors for TGraph: return values as a NumPy array
    c                 C  s    |   |¡}tj||j d¡d�S )Nú=)Údtype)ÚmemberÚnumpyZasarrayr   Znewbyteorder)ÚselfÚkeyÚvalues© r   úZ/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/uproot/behaviors/TGraph.pyÚ_normalize_array   s    
zTGraph._normalize_arrayÚbothc                 C  sL   |dv r|   d¡S |dv r$|   d¡S |dkr@|  d¡|  d¡fS tdƒ‚d	S )
aª  
        Args:
            axis (int or str): If ``0``, ``-2``, or ``"x"``, get the *x* axis.
                If ``1``, ``-1``, or ``"y"``, get the *y* axis. If ``"both"``,
                get ``"x"`` and ``"y"`` axes as a 2-tuple.

        Returns the values of all points in the scatter plot, either as a
        1-dimensional NumPy array (if ``axis`` selects only one) or as a 2-tuple
        (if ``axis="both"``).
        )r   éþÿÿÿÚxZfX)é   éÿÿÿÿÚyZfYr   r   r   z=axis must be 0 (-2, 'x'), 1 (-1, 'y'), or 'both' for a TGraphN)r   r
   Ú
ValueError)r   Zaxisr   r   r   r
      s    

ÿzTGraph.valuesN)r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r
   r   r   r   r   r      s   r   )r   Ú
__future__r   r   r   r   r   r   r   Ú<module>   s   