import numpy as np
wall = np.zeros((10, 10), dtype=np.int)
block = np.arange(1, 7).reshape(2, 3)
x = 2
y = 3
wall[x:x + block.shape[0], y:y + block.shape[1]] = block
How to "embed" a small numpy array into a predefined block of a large numpy array?