File tree Expand file tree Collapse file tree 3 files changed +8
-30
lines changed
package/MDAnalysis/converters
testsuite/MDAnalysisTests Expand file tree Collapse file tree 3 files changed +8
-30
lines changed Original file line number Diff line number Diff line change 8383
8484from ..guesser .tables import SYMB2Z
8585import numpy as np
86- from numpy .lib import NumpyVersion
8786
8887from . import base
8988from ..coordinates .base import SingleFrameReaderBase
@@ -171,21 +170,13 @@ def convert(self, obj):
171170 obj : AtomGroup or Universe or :class:`Timestep`
172171 """
173172 try :
174- # TODO: remove this guard when parmed has a release
175- # that supports NumPy 2
176- if NumpyVersion (np .__version__ ) < "2.0.0" :
177- import parmed as pmd
178- else :
179- raise ImportError
173+ import parmed as pmd
180174 except ImportError :
181- if NumpyVersion (np .__version__ ) >= "2.0.0" :
182- ermsg = "ParmEd is not compatible with NumPy 2.0+"
183- else :
184- ermsg = (
185- "ParmEd is required for ParmEdConverter but is not "
186- "installed. Try installing it with \n "
187- "pip install parmed"
188- )
175+ errmsg = (
176+ "ParmEd is required for ParmEdConverter but is not "
177+ "installed. Try installing it with \n "
178+ "pip install parmed"
179+ )
189180 raise ImportError (errmsg )
190181 try :
191182 # make sure to use atoms (Issue 46)
Original file line number Diff line number Diff line change 2323import pytest
2424import MDAnalysis as mda
2525
26- import numpy as np
2726from numpy .testing import assert_allclose , assert_equal
28- from numpy .lib import NumpyVersion
2927
3028from MDAnalysisTests .coordinates .base import _SingleFrameReader
3129from MDAnalysisTests .coordinates .reference import RefAdKSmall
4341 PRM_UreyBradley ,
4442)
4543
46- # TODO: remove this guard when parmed has a release
47- # that support NumPy 2
48- if NumpyVersion (np .__version__ ) < "2.0.0" :
49- pmd = pytest .importorskip ("parmed" )
50- else :
51- pmd = pytest .importorskip ("parmed_skip_with_numpy2" )
44+
45+ pmd = pytest .importorskip ("parmed" )
5246
5347
5448class TestParmEdReaderGRO :
Original file line number Diff line number Diff line change 4040import pytest
4141
4242from numpy .testing import assert_warns
43- import numpy as np
44- from numpy .lib import NumpyVersion
4543
4644
4745def block_import (package ):
@@ -121,11 +119,6 @@ def import_not_available(module_name):
121119 msg="skip test as module_name could not be imported")
122120
123121 """
124- # TODO: remove once these packages have a release
125- # with NumPy 2 support
126- if NumpyVersion (np .__version__ ) >= "2.0.0" :
127- if module_name == "parmed" :
128- return True
129122 try :
130123 test = importlib .import_module (module_name )
131124 except ImportError :
You can’t perform that action at this time.
0 commit comments