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

Method out_ind

dask/array/_array_expr/_blockwise.py:237–252  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

235
236 @property
237 def out_ind(self):
238 shapes = []
239 for arg in self.elemwise_args:
240 shape = getattr(arg, "shape", ())
241 if any(is_dask_collection(x) for x in shape):
242 # Want to exclude Delayed shapes and dd.Scalar
243 shape = ()
244 shapes.append(shape)
245 if isinstance(self.where, ArrayExpr):
246 shapes.append(self.where.shape)
247
248 shapes = [s if isinstance(s, Iterable) else () for s in shapes]
249 out_ndim = len(
250 broadcast_shapes(*shapes)
251 ) # Raises ValueError if dimensions mismatch
252 return tuple(range(out_ndim))[::-1]
253
254 @cached_property
255 def _info(self):

Callers

nothing calls this directly

Calls 3

is_dask_collectionFunction · 0.90
broadcast_shapesFunction · 0.90
anyFunction · 0.85

Tested by

no test coverage detected