U
    	-e                     @   s4   d dl mZ d dlmZmZmZ G dd deZdS )    )Basic)PSpace_symbol_converterRandomMatrixSymbolc                   @   s.   e Zd ZdZd	ddZedd Zdd ZdS )
RandomMatrixPSpacez
    Represents probability space for
    random matrices. It contains the mechanics
    for handling the API calls for random matrices.
    Nc                 C   s*   t |}|rt| ||S t| |S d S )N)r   r   __new__)clssymmodel r   Z/var/www/html/Darija-Ai-Train/env/lib/python3.8/site-packages/sympy/stats/random_matrix.pyr   
   s    zRandomMatrixPSpace.__new__c                 C   s(   z| j d W S  tk
r"   Y d S X d S )N   )args
IndexError)selfr   r   r   r
      s    zRandomMatrixPSpace.modelc                 G   s4   | 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.)Zatomsr   len
isinstanceNotImplementedErrorr
   Zdensity)r   exprr   Zrmsr   r   r   compute_density   s    
z"RandomMatrixPSpace.compute_density)N)__name__
__module____qualname____doc__r   propertyr
   r   r   r   r   r   r      s
   

r   N)Zsympy.core.basicr   Zsympy.stats.rvr   r   r   r   r   r   r   r   <module>   s   