I am using Numpy to raise a 2 X 2 array (matrix), with positive elements, to an integer power. To my surprise, starting at exponent 46, I am beginning to obtain negative elemnts in the result:
A = np.array([[1, 1], [1, 0]])
B = np.linalg.matrix_power(A, 46)
print(B)
[[-1323752223 1836311903]
[ 1836311903 1134903170]]
Things continue at powers higher than 46. WHAT AM I DOING WRONG?
Thank you in advance for your help.
My expectation would be for the matrix elements to become larger and larger positive integers.
Radu Valasutean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.