Today's challenge is available [here](https://adventofcode.com/2021/day/11).
Octopuses flash when their energy levels reach above 9 and it causes their neignbours to increase their levels by 1 too? This sounds like a perfect job for some kind of a matrix operation...
Loading data:
```py
def load():
with open('../.input/day11') as f:
lines = list(map(str.strip, f.readlines()))
return np.array([int(num) for line in lines for num in line]).reshape((-1, len(lines)))
```
In this chanllenge I decided to try my hand at using convolution matrix to solve this problem. First I had to create a function that would return an array containing octopuses and their neighbours. For this I used the following code:
```py
from numpy.lib.stride_tricks import as_strided
def windows(target, shape=(3, 3), stride: int = 1):