Skip to content

Commit

Permalink
xtcfile, use allclose correctly
Browse files Browse the repository at this point in the history
this damned thing wants to be to precise. just having an atol should be
enough.
  • Loading branch information
kain88-de committed Oct 29, 2015
1 parent ee9f617 commit 1a98b6d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 67 deletions.
130 changes: 64 additions & 66 deletions package/MDAnalysis/lib/formats/xtc.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package/MDAnalysis/lib/formats/xtc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ cdef class XTCFile:
raise ValueError('Previous frames contained {} atoms. You '
'are trying to write {} atoms.'.format(
self.n_atoms, xyz.shape[1]))
if not np.allclose(self.box, box):
if not np.allclose(self.box, box, rtol=0, atol=8):
raise ValueError('Previous frames contained {} box. You '
'are trying to write {} box.'.format(
self.box, box))
Expand Down

0 comments on commit 1a98b6d

Please sign in to comment.