Shift grid one row upwards, wrapping around, using np.roll

NumPy · from Capstone: Conway’s Game of Life, without a single loop

np.rollboolean masksastypeshifted sumswrap-aroundsimulation

Putting the kettle on…

Starting up…

Exercise 1

Shift grid one row upwards, wrapping around, using np.roll.

your answer
stuck? the lesson behind it
Capstone: Conway’s Game of Life, without a single loop
A whole simulation in two lines of array arithmetic.