I know that numpy can be used to solve linear equations as shown below:
import numpy as np
# Solving following system of linear equation
# 1a + 1b = 35
# 2a + 4b = 94
a = np.array([[1, 1],[2,4]])
b = np.array([35, 94])
print(np.linalg.solve(a,b))
Now, let's say, I have linear equations which involve the modulo operation. Can numpy solve such equations as well?
Equations of the following form:
m = 2 ** 31 - 1
(207560540 ∗ a + b) modulo m = 956631177
(956631177 ∗ a + b) modulo m = 2037688522
Thanks.