U
    ¾mœdƒ  ã                   @   s.   d dl mZmZmZ d dlmZ ddd„ZdS )é    )ÚCategoricalÚIndexÚSeries)ÚBaseMaskedArrayNc                 C   s�   t | tƒr| j}nTt | tƒr6|dks.| j|kr6| j}n0|dk	sBt‚| j |¡}t |tƒs\t‚|  	|¡}t |t
ƒrv|jS t |tƒr„|S t|d|ƒS )a  
    Helper method to get array for a DataFrame column or a Series.

    Equivalent of df[col].values, but without going through normal getitem,
    which triggers tracking references / CoW (and we might be testing that
    this is done by some other operation).
    NZ_ndarray)Ú
isinstancer   Z_valuesr   ÚnameÚAssertionErrorÚcolumnsZget_locÚintZ_get_column_arrayr   Ú_datar   Úgetattr)ÚobjÚcolZarrZicol© r   úT/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/pandas/tests/copy_view/util.pyÚ	get_array	   s    



r   )N)Zpandasr   r   r   Zpandas.core.arraysr   r   r   r   r   r   Ú<module>   s   