o
    Eb                     @   sZ   d dl Zd dlmZmZmZ d dlmZ d dl	m
Z
mZ G dd dZdd Zd	d
 ZdS )    N)assert_array_equalassert_array_almost_equal_nulpassert_almost_equal)raises)gammalnmultigammalnc                   @   s$   e Zd Zdd Zdd Zdd ZdS )TestMultiGammaLnc                 C   s4   t jd t t j }tt|dt| d S )N     )nprandomseedabsrandnr   r   r   )selfa r   F/usr/lib/python3/dist-packages/scipy/special/tests/test_spfun_stats.pytest1   s   zTestMultiGammaLn.test1c                 C   sL   t ddg}t|d}t t t jt| t|d  }t|| d S )Ng      @      $@         ?)r   arrayr   logZsqrtZpir   r   )r   r   resultZexpectedr   r   r   test2   s   
&zTestMultiGammaLn.test2c                 C   s   t ttdd d S )Nr   g333333?)assert_raises
ValueErrorr   )r   r   r   r   test_bararg   s   zTestMultiGammaLn.test_barargN)__name__
__module____qualname__r   r   r   r   r   r   r   r   	   s    r   c                 C   sT   t | |}t| j|j |  }| }t| jD ]}t|| t || | qd S )N)r   r   shapeZravelrangesizer   )r   dr   Za1Zresult1ir   r   r    _check_multigammaln_array_result   s   
r'   c                  C   s   t jd t t jddd dft t jddd dft ddddddft dgdft ddfg} | D ]	\}}t	|| q=d S )	Nr	      r      r
   r   g      2@g       @)
r   r   r   r   r   ZarangeZreshaper   Zfloat64r'   )casesr   r%   r   r   r   test_multigammaln_array_arg*   s   	r+   )Znumpyr   Znumpy.testingr   r   r   Zpytestr   r   Zscipy.specialr   r   r   r'   r+   r   r   r   r   <module>   s    