I have a 4 x 3 system to solve using numpy linalg.solve , but numpy keeps throwing LinAlgError: 1-dimensional array given. Array must be at least two-dimensional
.
Tutorials and questions available are all for square matrices, and I'm not sure how to proceed.
This is my code and matrix:
import numpy as np
A = np.array([[[[1/15, 1/15, 2/19],
1/15, 2/15, 4,19],
2/15, 2/15, 4/19],
2/15, 2/15, 4/19])
B = np.array([0.1144807411, 0.1262803853, 0.1234210927, 0.130977131])
C = np.linalg.solve(A, B)
print(C)
Where did it go wrong?