Skip to content

Commit 671fc03

Browse files
committed
add NUMPY_MMAP import
1 parent 3820f9f commit 671fc03

30 files changed

+60
-15
lines changed

examples/dmri_camino_dti.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818
Import necessary modules from nipype.
1919
"""
2020

21+
import os # system functions
2122
import nipype.interfaces.io as nio # Data i/o
2223
import nipype.interfaces.utility as util # utility
2324
import nipype.pipeline.engine as pe # pypeline engine
2425
import nipype.interfaces.camino as camino
2526
import nipype.interfaces.fsl as fsl
2627
import nipype.interfaces.camino2trackvis as cam2trk
2728
import nipype.algorithms.misc as misc
28-
import os # system functions
29+
from nipype.utils import NUMPY_MMAP
2930

3031
"""
3132
We use the following functions to scrape the voxel and data dimensions of the input images. This allows the

examples/dmri_connectivity.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
First, we import the necessary modules from nipype.
4848
"""
4949

50+
import inspect
51+
52+
import os.path as op # system functions
53+
import cmp # connectome mapper
5054
import nipype.interfaces.io as nio # Data i/o
5155
import nipype.interfaces.utility as util # utility
5256
import nipype.pipeline.engine as pe # pypeline engine
@@ -56,10 +60,7 @@
5660
import nipype.interfaces.freesurfer as fs # freesurfer
5761
import nipype.interfaces.cmtk as cmtk
5862
import nipype.algorithms.misc as misc
59-
import inspect
60-
61-
import os.path as op # system functions
62-
import cmp # connectome mapper
63+
from nipype.utils import NUMPY_MMAP
6364

6465
"""
6566
We define the following functions to scrape the voxel and data dimensions of the input images. This allows the

examples/fmri_ants_openfmri.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
from nipype.workflows.fmri.fsl import (create_featreg_preproc,
3737
create_modelfit_workflow,
3838
create_fixed_effects_flow)
39+
from nipype.utils import NUMPY_MMAP
40+
3941

4042
config.enable_provenance()
4143
version = 0

examples/fmri_spm_auditory.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
import nipype.pipeline.engine as pe # pypeline engine
2929
import nipype.algorithms.modelgen as model # model specification
3030
import os # system functions
31+
from nipype.utils import NUMPY_MMAP
32+
3133

3234
"""
3335

examples/fmri_spm_face.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
from __future__ import division
2121
from builtins import range
2222

23+
import os # system functions
2324
import nipype.interfaces.io as nio # Data i/o
2425
import nipype.interfaces.spm as spm # spm
2526
import nipype.interfaces.matlab as mlab # how to run matlab
2627
import nipype.interfaces.utility as util # utility
2728
import nipype.pipeline.engine as pe # pypeline engine
2829
import nipype.algorithms.modelgen as model # model specification
29-
import os # system functions
30+
from nipype.utils import NUMPY_MMAP
3031

3132
"""
3233

examples/rsfmri_vol_surface_preprocessing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
import numpy as np
7676
import scipy as sp
7777
import nibabel as nb
78+
from nipype.utils import NUMPY_MMAP
79+
7880

7981
imports = ['import os',
8082
'import nibabel as nb',

examples/rsfmri_vol_surface_preprocessing_nipy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
import numpy as np
7676
import scipy as sp
7777
import nibabel as nb
78+
from nipype.utils import NUMPY_MMAP
7879

7980
imports = ['import os',
8081
'import nibabel as nb',

nipype/algorithms/confounds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@
1616

1717
import os
1818
import os.path as op
19-
from distutils.version import LooseVersion
2019

2120
import nibabel as nb
2221
import numpy as np
2322
from numpy.polynomial import Legendre
24-
from scipy import linalg, signal
23+
from scipy import linalg
2524

2625
from .. import logging
2726
from ..external.due import BibTeX
2827
from ..interfaces.base import (traits, TraitedSpec, BaseInterface,
2928
BaseInterfaceInputSpec, File, isdefined,
3029
InputMultiPath)
30+
from nipype.utils import NUMPY_MMAP
31+
3132
IFLOG = logging.getLogger('interface')
3233

33-
NUMPY_MMAP = LooseVersion(np.__version__) >= LooseVersion('1.12.0')
3434

3535
class ComputeDVARSInputSpec(BaseInterfaceInputSpec):
3636
in_file = File(exists=True, mandatory=True, desc='functional data, after HMC')

nipype/algorithms/icc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from scipy.linalg import pinv
99
from ..interfaces.base import BaseInterfaceInputSpec, TraitedSpec, \
1010
BaseInterface, traits, File
11+
from nipype.utils import NUMPY_MMAP
1112

1213

1314
class ICCInputSpec(BaseInterfaceInputSpec):

nipype/algorithms/metrics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
from ..interfaces.base import (BaseInterface, traits, TraitedSpec, File,
3131
InputMultiPath,
3232
BaseInterfaceInputSpec, isdefined)
33+
from nipype.utils import NUMPY_MMAP
34+
3335
iflogger = logging.getLogger('interface')
3436

3537

0 commit comments

Comments
 (0)