From 8d269d900231da5c1a816d439750a7fcd7662046 Mon Sep 17 00:00:00 2001 From: domna Date: Wed, 19 Jun 2024 09:27:07 +0200 Subject: [PATCH 1/2] Use the suggested python version switch (as recommended in https://numpy.org/doc/stable/numpy_2_0_migration_guide.html#writing-numpy-version-dependent-code) --- src/elli/importer/nexus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elli/importer/nexus.py b/src/elli/importer/nexus.py index 1b60ce5e..54f242a3 100644 --- a/src/elli/importer/nexus.py +++ b/src/elli/importer/nexus.py @@ -12,7 +12,7 @@ import numpy as np import pandas as pd -if np.version.version < "2.0.0": +if np.lib.NumpyVersion(np.__version__) >= "2.0.0": from numpy.lib.index_tricks import IndexExpression else: from numpy.lib._index_tricks_impl import IndexExpression From 73790d59268cdd93209fdc95e0d0027a4ed70c15 Mon Sep 17 00:00:00 2001 From: domna Date: Wed, 19 Jun 2024 09:30:42 +0200 Subject: [PATCH 2/2] Set correct direction for < --- src/elli/importer/nexus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elli/importer/nexus.py b/src/elli/importer/nexus.py index 54f242a3..47b9981a 100644 --- a/src/elli/importer/nexus.py +++ b/src/elli/importer/nexus.py @@ -12,7 +12,7 @@ import numpy as np import pandas as pd -if np.lib.NumpyVersion(np.__version__) >= "2.0.0": +if np.lib.NumpyVersion(np.__version__) < "2.0.0": from numpy.lib.index_tricks import IndexExpression else: from numpy.lib._index_tricks_impl import IndexExpression