Skip to content

Commit f5ed4d6

Browse files
authored
Merge pull request #1808 from mgxd/tst/travis
tst: not defining specific icu
2 parents 61978ad + fffc62c commit f5ed4d6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ install:
3333
conda config --add channels conda-forge &&
3434
conda update --yes conda &&
3535
conda update --all -y python=$TRAVIS_PYTHON_VERSION &&
36-
conda install -y nipype icu==56.1 &&
36+
conda install -y nipype icu &&
3737
rm -r /home/travis/miniconda/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype* &&
3838
pip install -r requirements.txt &&
3939
pip install -e .[$NIPYPE_EXTRAS]; }

nipype/algorithms/misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,9 +1271,9 @@ def split_rois(in_file, mask=None, roishape=None):
12711271
np.savez(iname, (nzels[0][first:last],))
12721272

12731273
if fill > 0:
1274-
droi = np.vstack((droi, np.zeros((fill, nvols), dtype=np.float32)))
1274+
droi = np.vstack((droi, np.zeros((int(fill), int(nvols)), dtype=np.float32)))
12751275
partialmsk = np.ones((roisize,), dtype=np.uint8)
1276-
partialmsk[-fill:] = 0
1276+
partialmsk[-int(fill):] = 0
12771277
partname = op.abspath('partialmask.nii.gz')
12781278
nb.Nifti1Image(partialmsk.reshape(roishape), None,
12791279
None).to_filename(partname)

nipype/algorithms/modelgen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,12 +655,12 @@ def _gen_regress(self, i_onsets, i_durations, i_amplitudes, nscans):
655655
hrf = spm_hrf(dt * 1e-3)
656656
reg_scale = 1.0
657657
if self.inputs.scale_regressors:
658-
boxcar = np.zeros((50.0 * 1e3 / dt))
658+
boxcar = np.zeros(int(50.0 * 1e3 / dt))
659659
if self.inputs.stimuli_as_impulses:
660-
boxcar[1.0 * 1e3 / dt] = 1.0
660+
boxcar[int(1.0 * 1e3 / dt)] = 1.0
661661
reg_scale = float(TA / dt)
662662
else:
663-
boxcar[(1.0 * 1e3 / dt):(2.0 * 1e3 / dt)] = 1.0
663+
boxcar[int(1.0 * 1e3 / dt):int(2.0 * 1e3 / dt)] = 1.0
664664
if isdefined(self.inputs.model_hrf) and self.inputs.model_hrf:
665665
response = np.convolve(boxcar, hrf)
666666
reg_scale = 1.0 / response.max()

0 commit comments

Comments
 (0)