Skip to content

Commit a7b4097

Browse files
committed
Merge pull request #126 from aestrivex/fix_sample_floatingpoint_offby1
Fix sample floatingpoint offby1
2 parents 6c3d4ac + a8ee442 commit a7b4097

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

surfer/viz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
21692169

21702170
# find indexes at which to create frames
21712171
tstep = 1. / (framerate * time_dilation)
2172-
if (tmax - tmin) % tstep == 0:
2172+
if np.allclose((tmax - tmin) % tstep, 0):
21732173
tstop = tmax + tstep / 2.
21742174
else:
21752175
tstop = tmax

0 commit comments

Comments
 (0)