o
    oÇh  ã                   @   s  d Z ddlmZ ddlmZmZmZmZmZ ddl	m
Z
mZ ddlmZ ddlmZ edddƒZed	dd
ƒZeg d¢g d¢g d¢gƒZeg d¢g d¢g d¢gƒZedƒZeedƒƒZedƒZedƒ\ZZZdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Z dS )z
We have a few different kind of Matrices
Matrix, ImmutableMatrix, MatrixExpr

Here we test the extent to which they cooperate
é    )Úsymbols)ÚMatrixÚMatrixSymbolÚeyeÚIdentityÚImmutableMatrix)Ú
MatrixExprÚMatAdd©Úclassof)ÚraisesÚXé   Úvé   )r   é   r   )é   é   é   )é   é   é	   za,b,cc                   C   sL   t tt tƒs	J ‚t tt tƒsJ ‚t dt t tƒsJ ‚t t¡s$J ‚d S )Nr   )Ú
isinstanceÚMMÚIMr   Úequals© r   r   úz/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/sympy/matrices/tests/test_interactions.pyÚ
test_IM_MM   s   r   c                   C   sV   t tdƒt tƒsJ ‚t tt tƒsJ ‚t tt tƒsJ ‚tdƒt d dks)J ‚d S )Nr   ©r   r   r   )r   r   r   r   ÚSMr	   r   r   r   r   Ú
test_ME_MM    s   r!   c                  C   sR   t dƒtdƒttdƒƒ} }}| ||fD ]}| ||fD ]	}| |¡s%J ‚qqd S )Nr   )r   r   r   r   )ÚaÚbÚcÚxÚyr   r   r   Útest_equality'   s    ÿÿr'   c                  C   s4   t dddƒ} tdƒ|  }|d d| d  ksJ ‚d S )Nr   r   r   r   )r   r   )r   ÚYr   r   r   Útest_matrix_symbol_MM.   s   r)   c                  C   sT   t t } tt }| |ksJ ‚tjt j j}||ksJ ‚tjtj j}||ks(J ‚d S ©N)r   ÚSVr   ÚT)ÚAÚBÚCÚDr   r   r   Ú/test_matrix_symbol_vector_matrix_multiplication4   s   r1   c                   C   s|   t t d dt  ksJ ‚tt d td td  ksJ ‚tt d td td  td td   td td   ks<J ‚d S )Nr   r   )r   r   )r   r   )r   r   )r   r   )r"   r   r    r   r   r   r   Útest_indexing_interactions>   s
    (ÿr2   c                     sŒ   t ddtdƒƒ‰ tddtdƒƒ} tdddƒ‰tˆ ˆ ƒt ksJ ‚t| | ƒtks(J ‚tˆ | ƒtks1J ‚t| ˆ ƒtks:J ‚tt‡ ‡fdd„ƒ d S )Nr   r   r/   c                      s
   t ˆ ˆƒS r*   r
   r   ©r-   r/   r   r   Ú<lambda>M   s   
 ztest_classof.<locals>.<lambda>)r   Úranger   r   r   r   Ú	TypeError)r.   r   r3   r   Útest_classofE   s   r7   N)!Ú__doc__Úsympy.core.symbolr   Úsympy.matricesr   r   r   r   r   Úsympy.matrices.expressionsr   r	   Úsympy.matrices.matrixbaser   Úsympy.testing.pytestr   r    r+   r   r   ÚmeyeÚimeyeÚideyer"   r#   r$   r   r!   r'   r)   r1   r2   r7   r   r   r   r   Ú<module>   s*    
