MCPcopy
hub / github.com/dask/dask / full

Function full

dask/array/wrap.py:213–225  ·  view source on GitHub ↗
(shape, fill_value, *args, **kwargs)

Source from the content-addressed store, hash-verified

211
212
213def full(shape, fill_value, *args, **kwargs):
214 # np.isscalar has somewhat strange behavior:
215 # https://docs.scipy.org/doc/numpy/reference/generated/numpy.isscalar.html
216 if np.ndim(fill_value) != 0:
217 raise ValueError(
218 f"fill_value must be scalar. Received {type(fill_value).__name__} instead."
219 )
220 if kwargs.get("dtype") is None:
221 if hasattr(fill_value, "dtype"):
222 kwargs["dtype"] = fill_value.dtype
223 else:
224 kwargs["dtype"] = type(fill_value)
225 return _full(*args, shape=shape, fill_value=fill_value, **kwargs)
226
227
228def full_like(a, fill_value, *args, **kwargs):

Callers 1

full_likeFunction · 0.90

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…