@jit
def gen_adj_loop(width, height, adj):
    i = 0
for x in range(width):
    for y in range(height):
        if x > 0:
            adj[i, 0] = x
adj[i, 1] = y
adj[i, 2] = x - 1
adj[i, 3] = y
i += 1
if x < width - 1:
    adj[i, 0] = x
adj[i, 1] = y
adj[i, 2] = x + 1
adj[i, 3] = y
i += 1
if y > 0:
    adj[i, 0] = x
adj[i, 1] = y
adj[i, 2] = x
adj[i, 3] = y - 1
i += 1
if y < height - 1:
    adj[i, 0] = x
adj[i, 1] = y
adj[i, 2] = x
adj[i, 3] = y + 1
i += 1
return
Оптимизация набора кортежей целых чисел с помощью Numba?