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

Function full

dask/array/_array_expr/_creation.py:461–473  ·  view source on GitHub ↗
(shape, fill_value, *args, **kwargs)

Source from the content-addressed store, hash-verified

459
460
461def full(shape, fill_value, *args, **kwargs):
462 # np.isscalar has somewhat strange behavior:
463 # https://docs.scipy.org/doc/numpy/reference/generated/numpy.isscalar.html
464 if np.ndim(fill_value) != 0:
465 raise ValueError(
466 f"fill_value must be scalar. Received {type(fill_value).__name__} instead."
467 )
468 if kwargs.get("dtype") is None:
469 if hasattr(fill_value, "dtype"):
470 kwargs["dtype"] = fill_value.dtype
471 else:
472 kwargs["dtype"] = type(fill_value)
473 return _full(*args, shape=shape, fill_value=fill_value, **kwargs)
474
475
476def full_like(a, fill_value, order="C", dtype=None, chunks=None, name=None, shape=None):

Callers 1

full_likeFunction · 0.70

Calls 2

ndimMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…