MCPcopy Create free account
hub / github.com/dask/dask / implements

Function implements

dask/array/core.py:179–199  ·  view source on GitHub ↗

Register an __array_function__ implementation for dask.array.Array Register that a function implements the API of a NumPy function (or several NumPy functions in case of aliases) which is handled with ``__array_function__``. Parameters ---------- \\*numpy_functions : callab

(*numpy_functions)

Source from the content-addressed store, hash-verified

177
178
179def implements(*numpy_functions):
180 """Register an __array_function__ implementation for dask.array.Array
181
182 Register that a function implements the API of a NumPy function (or several
183 NumPy functions in case of aliases) which is handled with
184 ``__array_function__``.
185
186 Parameters
187 ----------
188 \\*numpy_functions : callables
189 One or more NumPy functions that are handled by ``__array_function__``
190 and will be mapped by `implements` to a `dask.array` function.
191 """
192
193 def decorator(dask_func):
194 for numpy_function in numpy_functions:
195 _HANDLED_FUNCTIONS[numpy_function] = dask_func
196
197 return dask_func
198
199 return decorator
200
201
202def _should_delegate(self, other) -> bool:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected