o
    ҷhA                     @   sJ   d dl Z d dlZd dlZd dlmZmZmZ d dlm	Z
 G dd dZdS )    N)	DataFrameIndexSeriesc                   @   s   e Zd Zdd Zdd ZdS )
TestMatMulc                 C   s~  t tjddg dg dd}t tjddg dddgd}t||}t t|j|jg dddgd}t	
|| t||j}tt|j|jjg dd	}t	|| t|j|}t|t skJ |j|jstJ |jttd
sJ t|j|j}t	|j| t|j |}t t|j|jg dddgd}t	|j|j |j t|d< t||}t t|j|jg dddgd}t	
|| |t}t||}t t|j|jg dddgd}t	
|| t tjddg dtdd}t tjddtdg dd}tjtdd t|| W d    d S 1 s8w   Y  d S )N   )      )abc)pqrs)indexcolumns)r   r   onetwo)r   r   r   )   r   r   r      r   r   alignedmatch)r   nprandomdefault_rngstandard_normaloperatormatmuldotvaluestmassert_frame_equalr   r   assert_series_equal
isinstancer   equalsr   r   rangeassert_almost_equaltolistr   roundastypeintpytestraises
ValueError)selfr	   r
   resultexpecteddfdf2 r5   Y/var/www/html/venv/lib/python3.10/site-packages/pandas/tests/frame/methods/test_matmul.pytest_matmul   sl   
$zTestMatMul.test_matmulc                 C   s   t jdd}t jdd}t|}d}tjt|d ||  W d    n1 s.w   Y  tjt|d | |  W d    d S 1 sLw   Y  d S )Nr   )
   r   r   z)shapes \(10, 4\) and \(5, 3\) not alignedr   )r   r   r   r   r-   r.   r/   r)   )r0   r	   r
   r3   msgr5   r5   r6   test_matmul_message_shapesV   s   
"z%TestMatMul.test_matmul_message_shapesN)__name__
__module____qualname__r7   r:   r5   r5   r5   r6   r      s    Gr   )r   numpyr   r-   pandasr   r   r   pandas._testing_testingr"   r   r5   r5   r5   r6   <module>   s    