O}m= d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m
Z
mZ e Z
dZd Z e ed e e
d
ej dd Zd
Z ddZ ddZdS )z;Implementation of __array_function__ overrides from NEP-18. N )
set_module)
getargspec)
add_docstring_get_implementing_args_ArrayFunctionDispatcherar like : array_like, optional
Reference object to allow the creation of arrays which are not
NumPy arrays. If an array-like passed in as ``like`` supports
the ``__array_function__`` protocol, the result will be defined
by it. In this case, it ensures the creation of an array object
compatible with that passed in via this argument.c ^ | j %| j dt | _ | S )Nz${ARRAY_FUNCTION_LIKE})__doc__replacearray_function_like_doc)
public_apis h/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/numpy/core/overrides.pyset_array_function_like_docr s4 %'/77$#
a
Class to wrap functions with checks for __array_function__ overrides.
All arguments are required, and can only be passed by position.
Parameters
----------
dispatcher : function or None
The dispatcher function that returns a single sequence-like object
of all arguments relevant. It must have the same signature (except
the default values) as the actual implementation.
If ``None``, this is a ``like=`` dispatcher and the
``_ArrayFunctionDispatcher`` must be called with ``like`` as the
first (additional and positional) argument.
implementation : function
Function that implements the operation on NumPy arrays without
overrides. Arguments passed calling the ``_ArrayFunctionDispatcher``
will be forwarded to this (and the ``dispatcher``) as if using
``*args, **kwargs``.
Attributes
----------
_implementation : function
The original implementation passed in.
ar
Collect arguments on which to call __array_function__.
Parameters
----------
relevant_args : iterable of array-like
Iterable of possibly array-like arguments to check for
__array_function__ methods.
Returns
-------
Sequence of arguments with __array_function__ methods, in the order in
which they should be called.
ArgSpeczargs varargs keywords defaultsc t t | }t t | }|j |j k s{|j |j k sk|j |j k s[t |j t |j k s1|j