o
    _~#gA  ã                   @   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
ƒƒ¡s€J ‚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   ú‹/var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/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    