The operation that should be padded.
The amount of padding that should be prepended for each dimension.
The amount of padding that should be appended for each dimension.
1 import dopt.core : evaluate; 2 3 auto p1 = int32([1, 1], [3]).pad([2, 1], [3, 3]); 4 5 assert(p1.evaluate().as!int == [ 6 0, 0, 0, 0, 0, 7 0, 0, 0, 0, 0, 8 0, 3, 0, 0, 0, 9 0, 0, 0, 0, 0, 10 0, 0, 0, 0, 0, 11 0, 0, 0, 0, 0 12 ]);
Pads the result of an operation with zeros in each dimension.