From 63cdb7cc68442317921a52c00698a865a6562b71 Mon Sep 17 00:00:00 2001 From: Matthew R Hermes Date: Tue, 9 Jul 2024 16:31:57 -0500 Subject: [PATCH] compare version as int, not str (#2309) --- pyscf/grad/lagrange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)