o
    iV                     @   s8   d dl Z d dlmZ d dlmZ d dlmZ dd ZdS )    N)_digamma)_gamma)_zetac                 C   sR   t | |\} }d| d  t| d  t| d | }t | dkt||S )a  Polygamma function n.

    Args:
        n (cupy.ndarray): The order of the derivative of `psi`.
        x (cupy.ndarray): Where to evaluate the polygamma function.

    Returns:
        cupy.ndarray: The result.

    .. seealso:: :data:`scipy.special.polygamma`

    g         g      ?r   )	cupybroadcast_arraysr   gammar   zetawherer   digamma)nxfac2 r   [/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/cupyx/scipy/special/_polygamma.py	polygamma   s   *r   )r   cupyx.scipy.specialr   r   r   r   r   r   r   r   <module>   s
    