Update linearsolver.py