diff --git a/test/optimizers/test_optimizers_scikitquant.py b/test/optimizers/test_optimizers_scikitquant.py index a8f8f191..37f257db 100644 --- a/test/optimizers/test_optimizers_scikitquant.py +++ b/test/optimizers/test_optimizers_scikitquant.py @@ -63,7 +63,8 @@ def test_bobyqa(self): self.skipTest(str(ex)) @unittest.skipIf( - tuple(map(int, numpy.__version__.split("."))) >= (1, 24, 0), + # NB: numpy.__version__ may contain letters, e.g. "1.26.0b1" + tuple(map(int, numpy.__version__.split(".")[:2])) >= (1, 24), "scikit's SnobFit currently incompatible with NumPy 1.24.0.", ) def test_snobfit(self): @@ -75,7 +76,8 @@ def test_snobfit(self): self.skipTest(str(ex)) @unittest.skipIf( - tuple(map(int, numpy.__version__.split("."))) >= (1, 24, 0), + # NB: numpy.__version__ may contain letters, e.g. "1.26.0b1" + tuple(map(int, numpy.__version__.split(".")[:2])) >= (1, 24), "scikit's SnobFit currently incompatible with NumPy 1.24.0.", ) @data((None,), ([(-1, 1), (None, None)],))