[FEA] : Add a pad operator modeling padarray in MATLAB
luitjens opened this issue · comments
Justin Luitjens commented
https://www.mathworks.com/help/images/ref/padarray.html
We should add a pad operator which functionally changes the size of a tensor and set's how out of bounds accesses get values. We should fully support padding pre, post, and both along with a pad value that can be a scalar value, circular, replicate, and symmetric.
auto op = pad(input, pad_shape, pad_type, direction);
Where
direction = [ matx::PRE, matx::POST, matx::BOTH]
pad_type: is either a scalar or an enum/functor to indicate circular, replicate, or symmetric.