Does Numpy have an inbuilt elementwise matrix modular exponentiation implementation

Viewed 697

Does numpy have an inbuilt implementation for modular exponentation of matrices?

(As pointed out by user2357112, I am actually looking for element wise modular reduction)

One way modular exponentiation on regular numbers is done is with Exponentiation by Squaring (https://en.wikipedia.org/wiki/Exponentiation_by_squaring), with a modular reduction taken at each step. I am wondering if there is a similar inbuilt solution for matrix multiplication. I am aware I can write code to emulate this easily, but I am wondering if there is an inbuilt solution.

1 Answers
Related