Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
overrides.cpython-313.pyc63 linesDownload Raw Back to __pycache__
1�

2z�j���J�SrSSKJs Jr SSKJr SSKJ	r3 SrSrSr
Srg)	zNTools for testing implementations of __array_function__ and ufunc overrides4 5 6�N)�ufunc)�ARRAY_FUNCTIONSc��[RR5Vs1sHn[U[5(dMUiM nnU$s snf)z�List all numpy ufuncs overridable via `__array_ufunc__`7 8Parameters9----------10None11 12Returns13-------14set15    A set containing all overridable ufuncs in the public numpy API.16)�_umath�__dict__�values�17isinstance�_ufunc)�obj�ufuncss  �]D:\code\apps\devtools\python\user_packages\Python313\site-packages\numpy/testing/overrides.py�get_overridable_numpy_ufuncsrsB��$�_�_�3�3�5�*�5�c��C��(��5�F�*��M��*s18�A�Ac�"�[U[5$)a�Determine if a function can be overridden via `__array_ufunc__`19 20Parameters21----------22func : callable23    Function that may be overridable via `__array_ufunc__`24 25Returns26-------27bool28    `True` if `func` is overridable via `__array_ufunc__` and29    `False` otherwise.30 31Notes32-----33This function is equivalent to ``isinstance(func, np.ufunc)`` and34will work correctly for ufuncs defined outside of Numpy.35 36)r	r37��funcs r
�allows_array_ufunc_overriders��(�d�F�#�#�c�8�SSKJn [R"5$)z�List all numpy functions overridable via `__array_function__`38 39Parameters40----------41None42 43Returns44-------45set46    A set containing all functions in the public numpy API that are47    overridable via `__array_function__`.48 49r��recfunctions)�	numpy.libr�_array_functions�copyrs r
�%get_overridable_numpy_array_functionsr3s�� '�� � �"�"rc��U[;$)a@Determine if a Numpy function can be overridden via `__array_function__`50 51Parameters52----------53func : callable54    Function that may be overridable via `__array_function__`55 56Returns57-------58bool59    `True` if `func` is a function in the Numpy API that is60    overridable via `__array_function__` and `False` otherwise.61)rrs r
�allows_array_function_overriderFs���#�#�#r)�__doc__�numpy._core.umath�_core�umathr�numpyrr62�numpy._core.overridesrrrrrr�rr
�<module>r$s,���63#�"�!�E��"$�.#�&$r
codekingpro/portable-devtools · Team Ai