Views for Cyclic Permutation or Zero Padding

Hi, I am wondering whether it is possible to make a view of an array with does cyclic permutation or zero padding. With view I mean that no data should be copied.

This would be very helpful for calculating finite differences with certain boundary conditions.
torch.diff allows to append/prepend some data, but for multidimentional arrays it is very cumbersome, and I think that it also copies the data finally.

Thanks for any advice
best wishes
Florian