pad Pad an array. numpy.pad(array, pad_width, mode='constant', **kwargs) Example 1. (1,2) : low_before, low_after (6,7) : col_before, col_after b=[[1,2],[3,4],] np.pad(b, ((1,2),(6,7)),'constant', constant_values=0) >>> array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0,..