
    sg                     :    d dl mZ d dlmZmZmZ  G d de      Zy)    )Basic)PSpace_symbol_converterRandomMatrixSymbolc                   .    e Zd ZdZddZed        Zd Zy)RandomMatrixPSpacez
    Represents probability space for
    random matrices. It contains the mechanics
    for handling the API calls for random matrices.
    Nc                 v    t        |      }|rt        j                  | ||      S t        j                  | |      S N)r   r   __new__)clssymmodels      L/var/www/html/venv/lib/python3.12/site-packages/sympy/stats/random_matrix.pyr   zRandomMatrixPSpace.__new__
   s3    $==c511==c**    c                 @    	 | j                   d   S # t        $ r Y y w xY w)N   )args
IndexError)selfs    r   r   zRandomMatrixPSpace.model   s'    	99Q< 		s    	c                     |j                  t              }t        |      dkD  st        |t              st	        d      | j
                  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   sO    jj+,s8a<
41C D% '0 1 1 zz!!$''r   r
   )__name__
__module____qualname____doc__r   propertyr   r    r   r   r   r      s%    
+  (r   r   N)sympy.core.basicr   sympy.stats.rvr   r   r   r   r%   r   r   <module>r(      s    " H H( (r   