Add constant slice to either side of array
(x, axis, depth, value)
| 257 | |
| 258 | |
| 259 | def 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 | |
| 275 | def _remove_overlap_boundaries(l, r, axis, depth): |
no test coverage detected
searching dependent graphs…