Closed
Description
To reproduce, you can test on an OpenFMRI dataset:
datalad install -r ///openfmri/ds000114
cd ds000114
git annex get sub-07/ses-test/anat/sub-07_ses-test_T1w.nii.gz
Install indexed_gzip
:
>>> import nibabel as nib
>>> img = load('ds000114/sub-07/ses-test/anat/sub-07_ses-test_T1w.nii.gz')
>>> img.shape
(256, 156, 256)
>>> img.dataobj[0]
I'm not sure how long it takes. Slicing along the last dimension is fast, so it's not reading the file that's the issue.
I think the fix will be to disable indexed_gzip
if nibabel.arrayproxy.KEEP_FILE_OPEN_DEFAULT is False
.