Skip to content

Commit 7a19ee0

Browse files
committed
FIX: Explicitly coerce millisecond slices to int
1 parent a67da28 commit 7a19ee0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: nipype/algorithms/modelgen.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -780,9 +780,9 @@ def _gen_regress(self, i_onsets, i_durations, i_amplitudes, nscans):
780780
matplotlib.use(config.get("execution", "matplotlib_backend"))
781781
import matplotlib.pyplot as plt
782782

783-
TR = np.round(self.inputs.time_repetition * 1000) # in ms
783+
TR = int(np.round(self.inputs.time_repetition * 1000)) # in ms
784784
if self.inputs.time_acquisition:
785-
TA = np.round(self.inputs.time_acquisition * 1000) # in ms
785+
TA = int(np.round(self.inputs.time_acquisition * 1000)) # in ms
786786
else:
787787
TA = TR # in ms
788788
nvol = self.inputs.volumes_in_cluster
@@ -797,7 +797,7 @@ def _gen_regress(self, i_onsets, i_durations, i_amplitudes, nscans):
797797
dttemp = math.gcd(TA, math.gcd(SILENCE, TR))
798798
if dt < dttemp:
799799
if dttemp % dt != 0:
800-
dt = float(math.gcd(dttemp, dt))
800+
dt = float(math.gcd(dttemp, int(dt)))
801801

802802
if dt < 1:
803803
raise Exception("Time multiple less than 1 ms")

0 commit comments

Comments
 (0)