Is it possible to use numpy's linalg.matrix_power with a modulo so the elements don't grow larger than a certain value?

Edit
Report