padding direction. Direction can be one of the following values: "both", "pre", and "post".
list of lengths for each dimension.
import mir.ndslice.allocation: slice; import mir.ndslice.topology: iota; auto pad = iota([3], 1) .padEdge([2]) .slice; assert(pad == [1, 1, 1, 2, 3, 3, 3]);
import mir.ndslice.allocation: slice; import mir.ndslice.topology: iota; auto pad = iota([2, 2], 1) .padEdge([2, 1]) .slice; assert(pad == [ [1, 1, 2, 2], [1, 1, 2, 2], [1, 1, 2, 2], [3, 3, 4, 4], [3, 3, 4, 4], [3, 3, 4, 4]]);
._concatenation examples.
Pads with the edge values of slice.