a
    ±<bU  ã                   @   s:   d Z ddlZddlmZmZ ddlmZ G dd„ dƒZ	dS )z@
Tests for np.foo applied to DataFrame, not necessarily ufuncs.
é    N)ÚCategoricalÚ	DataFramec                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚTestAsArrayc                 C   sR   t tddgƒtddgƒdœƒ}t |¡}tjddgddggdd}t ||¡ d S )Né   é   )ÚAÚBÚobject)Zdtype)r   r   ÚnpZasarrayÚarrayÚtmZassert_numpy_array_equal)ÚselfZdfÚresultÚexpected© r   úo/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/pandas/tests/frame/test_npfuncs.pyÚtest_asarray_homogenous   s    
z#TestAsArray.test_asarray_homogenousc                 C   s€   t jdd t  |¡}W d   ƒ n1 s,0    Y  t|t|ƒƒsHJ ‚|j|ju sXJ ‚|j|ju shJ ‚t || 	t j¡¡ d S )NÚignore)Úall)
r
   ZerrstateÚsqrtÚ
isinstanceÚtypeÚindexÚcolumnsr   Zassert_frame_equalÚapply)r   Zfloat_framer   r   r   r   Útest_np_sqrt   s    (zTestAsArray.test_np_sqrtN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r      s   r   )
Ú__doc__Znumpyr
   Zpandasr   r   Zpandas._testingZ_testingr   r   r   r   r   r   Ú<module>   s   