U
    sVÞcl
  ã                   @   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dddgd}ttj dd¡dd	d
gddddgdj}t ||¡}t t |j	|j	¡dd	d
gd}t
 ||¡ t |j|¡}t t |jj	|jj	¡dd	d
g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	¡dd	d
gd}t
 ||¡ | t¡}t |j|¡}t t |jj	|jj	¡dd	d
gd}t
 ||¡ d}tjt|d | |j	d d… ¡ W 5 Q R X d}tjt|d | |j¡ W 5 Q R X d S )Né   ÚpÚqÚrÚs)Úindexé   Ú1Ú2Ú3)r
   Úcolumnsz,Dot product shape mismatch, \(4,\) vs \(3,\))Úmatchzmatrices are not aligned)r   ÚnpÚrandomZrandnr   Ú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$   úK/tmp/pip-unpacked-wheel-xj8nt62q/pandas/tests/series/methods/test_matmul.pyÚtest_matmul   sR      
ÿ""
"zTestMatmul.test_matmulN)Ú__name__Ú
__module__Ú__qualname__r&   r$   r$   r$   r%   r      s   r   )r   Znumpyr   r   Zpandasr   r   Zpandas._testingZ_testingr   r   r$   r$   r$   r%   Ú<module>   s
   