o
    X۷i                     @  sN   d dl mZ d dlZd dlZd dlZd dlmZ ejdddddZd	d
 ZdS )    )annotationsN)_corecupyx_scipy_special_gammaln)zl->dze->dzf->fzd->dz
    if (isinf(out0_type(in0)) && in0 < 0) {
        out0 = -1.0 / 0.0;
    } else {
        out0 = lgamma(out0_type(in0));
    }
    a  Logarithm of the absolute value of the Gamma function.

    Args:
        x (cupy.ndarray): Values on the real line at which to compute
        ``gammaln``.

    Returns:
        cupy.ndarray: Values of ``gammaln`` at x.

    .. seealso:: :data:`scipy.special.gammaln`

    )docc                 C  s   t |rt||krtdt | rt j| td} tt | d|d  kr-td||d  d t	
t	j }t| }| jjdkrK|t j}|| }td|d D ]}|t| |d	 d  7 }qV|S )
a  Returns the log of multivariate gamma, also sometimes called the
    generalized gamma.

    Parameters
    ----------
    a : cupy.ndarray
        The multivariate gamma is computed for each item of `a`.
    d : int
        The dimension of the space of integration.

    Returns
    -------
    res : ndarray
        The values of the log multivariate gamma at the given points `a`.

    See Also
    --------
    :func:`scipy.special.multigammaln`

    z*d should be a positive integer (dimension))dtypeg      ?   z!condition a > 0.5 * (d-1) not metg      ?f   g      ?)cupyisscalarmathfloor
ValueErrorasarrayfloatintanynumpylogpigammalnr   kindastypefloat64range)adresgam0j r    R/home/ubuntu/vllm_env/lib/python3.10/site-packages/cupyx/scipy/special/_gammaln.pymultigammaln"   s   
r"   )	
__future__r   r   r   r
   r   create_ufuncr   r"   r    r    r    r!   <module>   s    