MatX icon indicating copy to clipboard operation
MatX copied to clipboard

[FEA] : Add a pad operator modeling padarray in MATLAB

Open luitjens opened this issue 2 years ago • 0 comments

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.

luitjens avatar Jul 18 '23 15:07 luitjens