If you want to pad the array "a" of shape (5,5,5,5,5) with pad = 1 for the 2nd dimension, pad = 3 for the 4th dimension, and pad = 0 for the rest, you would do: