Skip to content

Commit 00aec62

Browse files
STY: avoid while loop
1 parent 82b0209 commit 00aec62

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
@@ -2187,7 +2187,7 @@ def save_movie(self, fname, time_dilation=4., tmin=None, tmax=None,
21872187
raise ValueError("tmax=%r is greater than the latest time point "
21882188
"(%r)" % (tmax, self._times[-1]))
21892189
times = np.arange(tmin, tmax + sys.float_info.epsilon, tstep)
2190-
while times[-1] > tmax:
2190+
if times[-1] > tmax:
21912191
times = times[:-1]
21922192
interp_func = interp1d(self._times, np.arange(self.n_times))
21932193
time_idx = interp_func(times)

0 commit comments

Comments
 (0)