SciPy

scipy.sparse.lil_matrix.power

lil_matrix.power(n, dtype=None)[source]