Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcello-Sega committed Dec 2, 2024
1 parent dcec7ae commit d7b69bd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pytim/itim.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class ITIM(Interface):
... from pytim.datafiles import WATER_GRO, WATER_XTC
... t = mdtraj.load_xtc(WATER_XTC,top=WATER_GRO)
... inter = pytim.ITIM(t)
... except ModuleNotFoundError:
... except (ModuleNotFoundError,ValueError): # ValueError to handle mdtraj not supporting numpy2
... pass
Expand Down
4 changes: 2 additions & 2 deletions pytim/observables/contactangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class ContactAngle(object):
>>> # Contact angles from the averaged binned statistics of
>>> # surface atoms' radial distance as a function of the azimuthal angle
>>> np.round(CA.mean_contact_angles,2).tolist()
[96.23, 100.74]
>>> np.around(CA.mean_contact_angles,1).tolist()
[96.2, 100.7]
"""

Expand Down
4 changes: 2 additions & 2 deletions pytim/observables/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ def _():
>>> prof = pytim.observables.Profile(interface=inter)
>>> prof.sample(u.atoms)
>>> vals = prof.get_values(binwidth=0.5)[2]
>>> print(np.around(vals[len(vals)//2-3:len(vals)//2+3],decimals=6))
[0.073441 0.043007 0.028035 inf 0. 0. ]
>>> print(np.around(vals[len(vals)//2-3:len(vals)//2+3],decimals=3))
[0.073 0.043 0.028 inf 0. 0. ]
Expand Down
2 changes: 1 addition & 1 deletion pytim/sanity_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _check_universe(self, input_obj):
patchMDTRAJ(input_obj, self.interface.universe)
os.remove(_file.name)
return 'mdtraj'
except ImportError:
except (ImportError,ValueError): # ValueError to handle mdtraj not supporting numpy2
pass
try:
import os
Expand Down

0 comments on commit d7b69bd

Please sign in to comment.