dimensions to pad.
padding directions. Direction can be one of the following values: "both", "pre", and "post".
import mir.ndslice.allocation: slice; import mir.ndslice.topology: iota; auto pad = iota([2, 3], 1) .padEdge!([0], ["pre"])([2]) .slice; assert(pad == [ [1, 2, 3], [1, 2, 3], [1, 2, 3], [4, 5, 6]]);
import mir.ndslice.allocation: slice; import mir.ndslice.topology: iota; auto pad = iota([2, 2], 1) .padEdge!([0, 1], ["both", "post"])([2, 1]) .slice; assert(pad == [ [1, 2, 2], [1, 2, 2], [1, 2, 2], [3, 4, 4], [3, 4, 4], [3, 4, 4]]);
._concatenation examples.
Pads with the edge values of slice.