MCPcopy
hub / github.com/dask/dask / constant

Function constant

dask/array/overlap.py:259–272  ·  view source on GitHub ↗

Add constant slice to either side of array

(x, axis, depth, value)

Source from the content-addressed store, hash-verified

257
258
259def constant(x, axis, depth, value):
260 """Add constant slice to either side of array"""
261 chunks = list(x.chunks)
262 chunks[axis] = (depth,)
263
264 c = full_like(
265 x,
266 value,
267 shape=tuple(map(sum, chunks)),
268 chunks=tuple(chunks),
269 dtype=x.dtype,
270 )
271
272 return concatenate([c, x, c], axis=axis)
273
274
275def _remove_overlap_boundaries(l, r, axis, depth):

Callers 1

boundariesFunction · 0.70

Calls 2

full_likeFunction · 0.90
concatenateFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…