U
    L?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d
ddgdddgdddggZed
ddgdddgdddg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                     	   za,b,cc                   C   sL   t tt tstt tt ts$tt dt t ts:tttsHtd S )Nr   )
isinstanceMMIMr   AssertionErrorequals r   r   X/var/www/html/venv/lib/python3.8/site-packages/sympy/matrices/tests/test_interactions.py
test_IM_MM   s    r   c                   C   sV   t tdt tstt tt ts(tt tt ts:ttdt d dksRtd S )Nr   r   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 ]}||s8tq8q*d S )Nr   )r   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s0td S )Nr   r   r    r   )r   r   r   )r   Yr   r   r   test_matrix_symbol_MM.   s    r*   c                  C   sT   t t } tt }| |ksttjt j j}||ks6ttjtj j}||ksPtd S N)r   SVr   r   T)ABCDr   r   r   /test_matrix_symbol_vector_matrix_multiplication4   s    r2   c                   C   s|   t t d dt  ksttt d td td  ks8ttt d td td  td td   td td   ksxtd S )Nr    r   )r   r   )r   r   )r   r   )r   r   )r#   r   r   r!   r   r   r   r   test_indexing_interactions>   s
     (r3   c                     s   t ddtd tddtd} tdddt  t ks>tt| | tksPtt | tksbtt|  tkstttt fdd d S )Nr   r   r0   c                      s
   t  S r+   r
   r   r.   r0   r   r   <lambda>M       ztest_classof.<locals>.<lambda>)r   ranger   r   r   r   r   	TypeError)r/   r   r4   r   test_classofE   s    r9   N)!__doc__Zsympy.core.symbolr   Zsympy.matricesr   r   r   r   r   Zsympy.matrices.expressionsr   r	   Zsympy.matrices.matrixbaser   Zsympy.testing.pytestr   r!   r,   r   r   ZmeyeZimeyeZideyer#   r$   r%   r   r"   r(   r*   r2   r3   r9   r   r   r   r   <module>   s(     
