padding direction. Direction can be one of the following values: "both", "pre", and "post".
list of lengths for each dimension. Each length must be less or equal to the corresponding slice length.
import mir.ndslice.allocation: slice; import mir.ndslice.topology: iota; auto pad = iota([3], 1) .padSymmetric([2]) .slice; assert(pad == [2, 1, 1, 2, 3, 3, 2]);
import mir.ndslice.allocation: slice; import mir.ndslice.topology: iota; auto pad = iota([2, 2], 1) .padSymmetric([2, 1]) .slice; assert(pad == [ [3, 3, 4, 4], [1, 1, 2, 2], [1, 1, 2, 2], [3, 3, 4, 4], [3, 3, 4, 4], [1, 1, 2, 2]]);
._concatenation examples.
Pads with the reflection of the slice mirrored along the edge of the slice.