aesara.tensor.nlinalg.matrix_power#
- aesara.tensor.nlinalg.matrix_power(M, n)[source]#
Raise a square matrix,
M
, to the (integer) powern
.This implementation uses exponentiation by squaring which is significantly faster than the naive implementation. The time complexity for exponentiation by squaring is :math:
mathcal{O}((n log M)^k)
- Parameters:
M (TensorVariable) –
n (int) –