HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/numpy/testing/__pycache__/overrides.cpython-310.pyc
o

���gK�@sRdZddlmZddlmZddlmm	Z
dd�Zdd�Zd	d
�Z
dd�ZdS)
zNTools for testing implementations of __array_function__ and ufunc overrides


�)�ARRAY_FUNCTIONS)�ufuncNcCsdd�tj��D�}|S)z�List all numpy ufuncs overridable via `__array_ufunc__`

    Parameters
    ----------
    None

    Returns
    -------
    set
        A set containing all overridable ufuncs in the public numpy API.
    cSsh|]	}t|t�r|�qS�)�
isinstance�_ufunc)�.0�objrr�B/usr/local/lib/python3.10/dist-packages/numpy/testing/overrides.py�	<setcomp>s
�z/get_overridable_numpy_ufuncs.<locals>.<setcomp>)�_umath�__dict__�values)�ufuncsrrr	�get_overridable_numpy_ufuncs
srcCst|tj�S)a�Determine if a function can be overridden via `__array_ufunc__`

    Parameters
    ----------
    func : callable
        Function that may be overridable via `__array_ufunc__`

    Returns
    -------
    bool
        `True` if `func` is overridable via `__array_ufunc__` and
        `False` otherwise.

    Notes
    -----
    This function is equivalent to ``isinstance(func, np.ufunc)`` and
    will work correctly for ufuncs defined outside of Numpy.

    )r�npr��funcrrr	�allows_array_ufunc_overridesrcCsddlm}t��S)aList all numpy functions overridable via `__array_function__`

    Parameters
    ----------
    None

    Returns
    -------
    set
        A set containing all functions in the public numpy API that are
        overridable via `__array_function__`.

    r��recfunctions)�	numpy.libr�_array_functions�copyrrrr	�%get_overridable_numpy_array_functions2srcCs|tvS)ahDetermine if a Numpy function can be overridden via `__array_function__`

    Parameters
    ----------
    func : callable
        Function that may be overridable via `__array_function__`

    Returns
    -------
    bool
        `True` if `func` is a function in the Numpy API that is
        overridable via `__array_function__` and `False` otherwise.
    )rrrrr	�allows_array_function_overrideEsr)�__doc__�numpy.core.overridesrr�numpyrr�numpy.core.umath�core�umathrrrrrrrrr	�<module>s