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)
| 177 | |
| 178 | |
| 179 | def 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 | |
| 202 | def _should_delegate(self, other) -> bool: |
nothing calls this directly
no outgoing calls
no test coverage detected