Switched `np.linalg.solve` to the sparse version