o
    װi                     @   s@   d dl mZ dZejdddeddZdZejd	dd
eddZdS )    )_corez

template <typename T>
static __device__ T xlogy(T x, T y) {
    if ((x == (T)0.0) && !isnan(y)) {
        return (T)0.0;
    } else {
        return x * log(y);
    }
}


cupy_xlogy)zee->fzff->fzdd->dzFF->FzDD->Dz"out0 = out0_type(xlogy(in0, in1));zCompute ``x*log(y)`` so that the result is 0 if ``x = 0``.

    Args:
        x (cupy.ndarray): input data

    Returns:
        cupy.ndarray: values of ``x * log(y)``

    .. seealso:: :data:`scipy.special.xlogy`

    )preambledocz

template <typename T>
static __device__ T xlog1py(T x, T y) {
    if ((x == (T)0.0) && ~isnan(y)) {
        return (T)0.0;
    } else {
        return x * log1p(y);
    }
}

cupy_xlog1pyz$out0 = out0_type(xlog1py(in0, in1));zCompute ``x*log1p(y)`` so that the result is 0 if ``x = 0``.

    Args:
        x (cupy.ndarray): input data

    Returns:
        cupy.ndarray: values of ``x * log1p(y)``

    .. seealso:: :data:`scipy.special.xlog1py`

    N)cupyr   xlogy_definitioncreate_ufuncxlogyxlog1py_definitionxlog1py r   r   N/home/ubuntu/.local/lib/python3.10/site-packages/cupyx/scipy/special/_xlogy.py<module>   s"    
