Enum ndarray_ndimage::PadMode
source · pub enum PadMode<T> {
Constant(T),
Edge,
Maximum,
Mean,
Median,
Minimum,
Reflect,
Symmetric,
Wrap,
}Expand description
Method that will be used to select the padded values.
Variants
Constant(T)
Pads with a constant value.
[1, 2, 3] -> [T, T, 1, 2, 3, T, T]
Edge
Pads with the edge values of array.
[1, 2, 3] -> [1, 1, 1, 2, 3, 3, 3]
Maximum
Pads with the maximum value of all or part of the vector along each axis.
[1, 2, 3] -> [3, 3, 1, 2, 3, 3, 3]
Mean
Pads with the mean value of all or part of the vector along each axis.
[1, 2, 3] -> [2, 2, 1, 2, 3, 2, 2]
Median
Pads with the median value of all or part of the vector along each axis.
[1, 2, 3] -> [2, 2, 1, 2, 3, 2, 2]
Minimum
Pads with the minimum value of all or part of the vector along each axis.
[1, 2, 3] -> [1, 1, 1, 2, 3, 1, 1]
Reflect
Pads with the reflection of the vector mirrored on the first and last values of the vector along each axis.
[1, 2, 3] -> [3, 2, 1, 2, 3, 2, 1]
Symmetric
Pads with the reflection of the vector mirrored along the edge of the array.
[1, 2, 3] -> [2, 1, 1, 2, 3, 3, 2]
Wrap
Pads with the wrap of the vector along the axis. The first values are used to pad the end and the end values are used to pad the beginning.
[1, 2, 3] -> [2, 3, 1, 2, 3, 1, 2]