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

Function _broadcast_any

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

Source from the content-addressed store, hash-verified

927 slices = slices_from_chunks(chunks)
928
929 def _broadcast_any(ar, shape, chunks):
930 if isinstance(ar, Array):
931 return broadcast_to(ar, shape).rechunk(chunks)
932 elif isinstance(ar, np.ndarray):
933 return np.ascontiguousarray(np.broadcast_to(ar, shape))
934 else:
935 raise TypeError("Unknown object type for broadcast")
936
937 # Broadcast all arguments, get tiny versions as well
938 # 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