I have a very large array that I would like tile with overlap. For example, if the array looks like
a b c d e
f g h i j
k l m n o
p q r s t
u v w x y
I want to break it up into 3 x 3 tiles, where each tile overlaps its neighbor by 1 on each side:
a b c c d e
f g h h i j
k l m m n o
k l m m n o
p q r r s t
u v w w x y
The "reshape and transpose trick" (described in https://www.kaggle.com/c/hubmap-kidney-segmentation/discussion/202171) is an approach for tiling a large array in Python (and other languages) that allows abutting (not overlapping) tiles to be extracted and represented without having to copy the underlying data array.
What I'm wondering is: Can this trick be used if we want to tiles to overlap, as shown above? If so, how?