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

Function _broadcast_any

dask/array/random.py:925–931  ·  view source on GitHub ↗
(ar, shape, chunks)

Source from the content-addressed store, hash-verified

923 slices = slices_from_chunks(chunks)
924
925 def _broadcast_any(ar, shape, chunks):
926 if isinstance(ar, Array):
927 return broadcast_to(ar, shape).rechunk(chunks)
928 elif isinstance(ar, np.ndarray):
929 return np.ascontiguousarray(np.broadcast_to(ar, shape))
930 else:
931 raise TypeError("Unknown object type for broadcast")
932
933 # Broadcast all arguments, get tiny versions as well
934 # Start adding the relevant bits to the graph

Callers 1

_wrap_funcFunction · 0.85

Calls 2

broadcast_toFunction · 0.90
rechunkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…