MCPcopy Index your code
hub / github.com/dask/dask / DoubleOutputs

Class DoubleOutputs

dask/array/_array_expr/_ufunc.py:298–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296
297
298class DoubleOutputs(ArrayExpr):
299 _parameters = ["array", "index", "meta", "name", "func"]
300
301 @functools.cached_property
302 def _meta(self):
303 meta = self.operand("meta")
304 a = np.empty_like(meta, shape=(1,) * meta.ndim, dtype=meta.dtype)
305 result = self.operand("func")(a)
306 return result[self.operand("index")]
307
308 @functools.cached_property
309 def chunks(self):
310 return self.array.chunks
311
312 @functools.cached_property
313 def _name(self):
314 return self.operand("name") + _tokenize_deterministic(*self.operands)
315
316 def _layer(self) -> dict:
317 return {
318 (self._name,) + key[1:]: (getitem, key, self.operand("index"))
319 for key in core.flatten(self.array.__dask_keys__())
320 }
321
322
323@derived_from(np)

Callers 2

frexpFunction · 0.85
modfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…