From fdee60e1c24827f6d4b9f97186540600d6c10305 Mon Sep 17 00:00:00 2001 From: gjcooper Date: Tue, 30 May 2017 12:23:28 +1000 Subject: [PATCH] FIX: Import mmap into inner function --- nipype/workflows/dmri/fsl/artifacts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nipype/workflows/dmri/fsl/artifacts.py b/nipype/workflows/dmri/fsl/artifacts.py index 2b1c6fa183..c581769ba3 100644 --- a/nipype/workflows/dmri/fsl/artifacts.py +++ b/nipype/workflows/dmri/fsl/artifacts.py @@ -236,6 +236,7 @@ def _gen_index(in_file): import numpy as np import nibabel as nb import os + from nipype.utils import NUMPY_MMAP out_file = os.path.abspath('index.txt') vols = nb.load(in_file, mmap=NUMPY_MMAP).get_data().shape[-1] np.savetxt(out_file, np.ones((vols,)).T)