
    Ed                     B    d dl mZ d dlmZmZmZ  G d de          ZdS )    )Basic)PSpace_symbol_converterRandomMatrixSymbolc                   6    e Zd ZdZddZed             Zd ZdS )RandomMatrixPSpacez
    Represents probability space for
    random matrices. It contains the mechanics
    for handling the API calls for random matrices.
    Nc                 z    t          |          }|rt          j        | ||          S t          j        | |          S N)r   r   __new__)clssymmodels      9lib/python3.11/site-packages/sympy/stats/random_matrix.pyr   zRandomMatrixPSpace.__new__
   s=    $$ 	+=c5111=c***    c                 @    	 | j         d         S # t          $ r Y d S w xY w)N   )args
IndexError)selfs    r   r   zRandomMatrixPSpace.model   s5    	9Q< 	 	 	44	s    
c                     |                     t                    }t          |          dk    st          |t                    st	          d          | j                            |          S )N   zoCurrently, no algorithm has been implemented to handle general expressions containing multiple random matrices.)atomsr   len
isinstanceNotImplementedErrorr   density)r   exprr   rmss       r   compute_densityz"RandomMatrixPSpace.compute_density   sg    jj+,,s88a< 	1
41C D D 	1% '0 1 1 1 z!!$'''r   r
   )__name__
__module____qualname____doc__r   propertyr   r    r   r   r   r      s\         
+ + + +   X( ( ( ( (r   r   N)sympy.core.basicr   sympy.stats.rvr   r   r   r   r%   r   r   <module>r(      si    " " " " " " H H H H H H H H H H( ( ( ( ( ( ( ( ( (r   