diff --git a/pyscf/grad/lagrange.py b/pyscf/grad/lagrange.py index 89ff6d99a0..64f9d37971 100644 --- a/pyscf/grad/lagrange.py +++ b/pyscf/grad/lagrange.py @@ -192,7 +192,7 @@ def __call__(self, x): x /= Adiagd return x -if scipy.__version__.split('.')[1] >= '14': # scipy 1.14 +if int (scipy.__version__.split('.')[1]) >= 14: # scipy 1.14 def _cg(A, b, x0=None, *, tol=1e-05, atol=0.0, maxiter=None, M=None, callback=None): return sparse_linalg.cg(A, b, x0, rtol=tol, atol=atol, maxiter=maxiter, M=M, callback=callback)