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

Function check_if_handled_given_other

dask/array/core.py:226–240  ·  view source on GitHub ↗

Check if method is handled by Dask given type of other Ensures proper deferral to upcast types in dunder operations without assuming unknown types are automatically downcast types.

(f)

Source from the content-addressed store, hash-verified

224
225
226def check_if_handled_given_other(f):
227 """Check if method is handled by Dask given type of other
228
229 Ensures proper deferral to upcast types in dunder operations without
230 assuming unknown types are automatically downcast types.
231 """
232
233 @wraps(f)
234 def wrapper(self, other):
235 if _should_delegate(self, other):
236 return NotImplemented
237 else:
238 return f(self, other)
239
240 return wrapper
241
242
243def slices_from_chunks(chunks):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected