U
    _{f                     @   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   Z/var/www/html/Darija-Ai-API/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   