a
    PªfÏ
  ã                   @   sF   d dl Z d dlZd dlZd dlmZmZ d dlmZ	 G dd„ dƒZ
dS )é    N)Ú	DataFrameÚSeriesc                   @   s   e Zd Zdd„ ZdS )Ú
TestMatmulc                 C   sª  t tj d¡ d¡g d¢d}ttj d¡ d¡g d¢g d¢dj}t ||¡}t t 	|j
|j
¡g d¢d}t ||¡ t |j|¡}t t 	|jj
|jj
¡g d¢d}t ||¡ t ||¡}t 	|j
|j
¡}t ||¡ t |j
|¡}t 	|j
|j
¡}t ||¡ t |j
 ¡ |¡}t 	|j
|j
¡}t ||¡ t |jj
|¡}t 	|jj
|j
¡}t ||¡ t |jj
 ¡ |¡}t 	|jj
|j
¡}t ||¡ t|jƒ|d< t |j|¡}t t 	|jj
|jj
¡g d¢d}t ||¡ | t¡}t |j|¡}t t 	|jj
|jj
¡g d¢d}t ||¡ d	}tjt|d
$ | 	|j
d d… ¡ W d   ƒ n1 s\0    Y  d}tjt|d
 | 	|j¡ W d   ƒ n1 sœ0    Y  d S )Né   é   )ÚpÚqÚrÚs)Úindex)é   r   )Ú1Ú2Ú3)r   Úcolumnsr   z,Dot product shape mismatch, \(4,\) vs \(3,\))Úmatchr   zmatrices are not aligned)r   ÚnpÚrandomZdefault_rngZstandard_normalr   ÚTÚoperatorÚmatmulÚdotÚvaluesÚtmZassert_series_equalZassert_almost_equalÚtolistÚintr   ZastypeÚpytestZraisesÚ	ExceptionÚ
ValueError)ÚselfÚaÚbÚresultÚexpectedÚmsg© r%   ú`/var/www/ai-form-bot/venv/lib/python3.9/site-packages/pandas/tests/series/methods/test_matmul.pyÚtest_matmul   sV    ÿý  
 4zTestMatmul.test_matmulN)Ú__name__Ú
__module__Ú__qualname__r'   r%   r%   r%   r&   r      s   r   )r   Únumpyr   r   Zpandasr   r   Zpandas._testingZ_testingr   r   r%   r%   r%   r&   Ú<module>   s
   