internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: nilearn/nilearn

Issue:
add Seealsos: refs to NiftiMasker
I would vote to put see also refs to NiftiMasker

in regions functions eg in:

https://nilearn.github.io/modules/generated/nilearn.regions.img_to_signals_labels.html#nilearn.regions.img_to_signals_labels



Discussion:
+1: the NiftiLabelsMasker needs to be mentioned in the see also of this
function.

In general, the maskers should be mentioned more as "see also"s in this
module, as people find this module naturally instead of the maskers.

Thanks @agramfort for the issue!



Resolving patch:
diff --git a/nilearn/regions/signal_extraction.py b/nilearn/regions/signal_extraction.py
--- a/nilearn/regions/signal_extraction.py
+++ b/nilearn/regions/signal_extraction.py
@@ -64,6 +64,8 @@ def img_to_signals_labels(imgs, labels_img, mask_img=None,
     --------
     nilearn.regions.signals_to_img_labels
     nilearn.regions.img_to_signals_maps
+    nilearn.input_data.NiftiLabelsMasker : Signal extraction on labels images 
+        e.g. clusters
     """
 
     labels_img = _utils.check_niimg_3d(labels_img)
@@ -151,6 +153,8 @@ def signals_to_img_labels(signals, labels_img, mask_img=None,
     --------
     nilearn.regions.img_to_signals_labels
     nilearn.regions.signals_to_img_maps
+    nilearn.input_data.NiftiLabelsMasker : Signal extraction on labels
+        images e.g. clusters
     """
 
     labels_img = _utils.check_niimg_3d(labels_img)
@@ -236,6 +240,8 @@ def img_to_signals_maps(imgs, maps_img, mask_img=None):
     --------
     nilearn.regions.img_to_signals_labels
     nilearn.regions.signals_to_img_maps
+    nilearn.input_data.NiftiMapsMasker : Signal extraction on probabilistic 
+        maps e.g. ICA
     """
 
     maps_img = _utils.check_niimg_4d(maps_img)
@@ -303,6 +309,7 @@ def signals_to_img_maps(region_signals, maps_img, mask_img=None):
     --------
     nilearn.regions.signals_to_img_labels
     nilearn.regions.img_to_signals_maps
+    nilearn.input_data.NiftiMapsMasker
     """
 
     maps_img = _utils.check_niimg_4d(maps_img)


Test patch:
Repository: nilearn/nilearn

Issue:
Ship compressed versions of the ICBM altases
The ICM atlases that we ship are not compressed. As a result, they use a total of 136Mb on a download (eg circleCI). We should reship them using OSF, after a "gzip -9", this drops the disk usage to 61Mb.


Discussion:
I'll try to do this now, in an effort to fix circle.

Resolving patch:
diff --git a/nilearn/datasets/struct.py b/nilearn/datasets/struct.py
--- a/nilearn/datasets/struct.py
+++ b/nilearn/datasets/struct.py
@@ -63,28 +63,34 @@ def fetch_icbm152_2009(data_dir=None, url=None, resume=True, verbose=1):
     -----
     For more information about this dataset's structure:
     http://www.bic.mni.mcgill.ca/ServicesAtlases/ICBM152NLin2009
+
+    The original download URL is
+    http://www.bic.mni.mcgill.ca/~vfonov/icbm/2009/mni_icbm152_nlin_sym_09a_nifti.zip
     """
     if url is None:
-        url = "http://www.bic.mni.mcgill.ca/~vfonov/icbm/2009/" \
-              "mni_icbm152_nlin_sym_09a_nifti.zip"
+        # The URL can be retrieved from the nilearn account on OSF (Open
+        # Science Framework), https://osf.io/4r3jt/quickfiles/
+        # Clicking on the "share" button gives the root of the URL.
+        url = "https://osf.io/7pj92/download"
     opts = {'uncompress': True}
 
     keys = ("csf", "gm", "wm",
             "pd", "t1", "t2", "t2_relax",
             "eye_mask", "face_mask", "mask")
     filenames = [(os.path.join("mni_icbm152_nlin_sym_09a", name), url, opts)
-                 for name in ("mni_icbm152_csf_tal_nlin_sym_09a.nii",
-                              "mni_icbm152_gm_tal_nlin_sym_09a.nii",
-                              "mni_icbm152_wm_tal_nlin_sym_09a.nii",
-
-                              "mni_icbm152_pd_tal_nlin_sym_09a.nii",
-                              "mni_icbm152_t1_tal_nlin_sym_09a.nii",
-                              "mni_icbm152_t2_tal_nlin_sym_09a.nii",
-                              "mni_icbm152_t2_relx_tal_nlin_sym_09a.nii",
-
-                              "mni_icbm152_t1_tal_nlin_sym_09a_eye_mask.nii",
-                              "mni_icbm152_t1_tal_nlin_sym_09a_face_mask.nii",
-                              "mni_icbm152_t1_tal_nlin_sym_09a_mask.nii")]
+                 for name in (
+                    "mni_icbm152_csf_tal_nlin_sym_09a.nii.gz",
+                    "mni_icbm152_gm_tal_nlin_sym_09a.nii.gz",
+                    "mni_icbm152_wm_tal_nlin_sym_09a.nii.gz",
+
+                    "mni_icbm152_pd_tal_nlin_sym_09a.nii.gz",
+                    "mni_icbm152_t1_tal_nlin_sym_09a.nii.gz",
+                    "mni_icbm152_t2_tal_nlin_sym_09a.nii.gz",
+                    "mni_icbm152_t2_relx_tal_nlin_sym_09a.nii.gz",
+
+                    "mni_icbm152_t1_tal_nlin_sym_09a_eye_mask.nii.gz",
+                    "mni_icbm152_t1_tal_nlin_sym_09a_face_mask.nii.gz",
+                    "mni_icbm152_t1_tal_nlin_sym_09a_mask.nii.gz")]
 
     dataset_name = 'icbm152_2009'
     data_dir = _get_dataset_dir(dataset_name, data_dir=data_dir,


Test patch:
Repository: nilearn/nilearn

Issue:
Super verbose CI logs
The CI logs are brimming with noise, making it a chore to debug a real problem.

Moreover TravisCI has a log length beyond which it terminates the testing and we have started bumping against it.

We should systematically check all the warnings being generated and update the codebase so they are no longer generated.

This should be made a priority, these spurious failures are costing time and enthusiasm.


Discussion:
Absolutely. We need to:

* See where warnings call for a fix on our side
* add in the codebase a few well targeted warning suppression code (https://docs.python.org/2/library/warnings.html#temporarily-suppressing-warnings)

Resolving patch:
diff --git a/examples/02_decoding/plot_haxby_different_estimators.py b/examples/02_decoding/plot_haxby_different_estimators.py
--- a/examples/02_decoding/plot_haxby_different_estimators.py
+++ b/examples/02_decoding/plot_haxby_different_estimators.py
@@ -71,14 +71,18 @@
                       param_grid={'C': [.1, .5, 1., 5., 10., 50., 100.]},
                       scoring='f1', n_jobs=1, cv=3, iid=False)
 
-logistic_cv = GridSearchCV(LogisticRegression(C=1., penalty="l1"),
-                           param_grid={'C': [.1, .5, 1., 5., 10., 50., 100.]},
-                           scoring='f1', cv=3, iid=False)
-logistic_l2_cv = GridSearchCV(LogisticRegression(C=1., penalty="l2"),
-                              param_grid={
-                                  'C': [.1, .5, 1., 5., 10., 50., 100.]
-                              },
-                              scoring='f1', cv=3, iid=False)
+logistic_cv = GridSearchCV(
+        LogisticRegression(C=1., penalty="l1", solver='liblinear'),
+        param_grid={'C': [.1, .5, 1., 5., 10., 50., 100.]},
+        scoring='f1', cv=3, iid=False,
+        )
+logistic_l2_cv = GridSearchCV(
+        LogisticRegression(C=1., penalty="l2", solver='liblinear'),
+        param_grid={
+            'C': [.1, .5, 1., 5., 10., 50., 100.]
+            },
+        scoring='f1', cv=3, iid=False,
+        )
 
 # The ridge classifier has a specific 'CV' object that can set it's
 # parameters faster than using a GridSearchCV


Test patch:
diff --git a/nilearn/decoding/tests/test_space_net.py b/nilearn/decoding/tests/test_space_net.py
--- a/nilearn/decoding/tests/test_space_net.py
+++ b/nilearn/decoding/tests/test_space_net.py
@@ -216,8 +216,12 @@ def test_log_reg_vs_graph_net_two_classes_iris(C=.01, tol=1e-10,
         mask=mask, alphas=1. / C / X.shape[0], l1_ratios=1., tol=tol,
         verbose=0, max_iter=1000, penalty="tv-l1", standardize=False,
         screening_percentile=100.).fit(X_, y)
-    sklogreg = LogisticRegression(penalty="l1", fit_intercept=True,
-                                  tol=tol, C=C).fit(X, y)
+    sklogreg = LogisticRegression(penalty="l1",
+                                  fit_intercept=True,
+                                  solver='liblinear',
+                                  tol=tol,
+                                  C=C,
+                                  ).fit(X, y)
 
     # compare supports
     np.testing.assert_array_equal((np.abs(tvl1.coef_) < zero_thr),
Repository: nilearn/nilearn

Issue:
Using argument alpha has no effect using in plot_prob_atlas with continous view_type
alpha is not called at display.add_overlay in ```plot_prob_atlas``` function. Inputs from @alpinho 

Code to reproduce:

```python
from nilearn import plotting, datasets

smith = datasets.fetch_atlas_smith_2009()
plotting.plot_prob_atlas(smith.rsn20, view_type='continuous', alpha=0.9)
plotting.plot_prob_atlas(smith.rsn20, view_type='continuous', alpha=0.2)
```
It is always the same results no matter the change in ```alpha```.
![alpha_0 2](https://user-images.githubusercontent.com/11410385/46409369-8edeb200-c715-11e8-823c-0da67dea1b26.png)
![alpha_0 9](https://user-images.githubusercontent.com/11410385/46409370-8edeb200-c715-11e8-94f2-ab206882fbc5.png)

Expected to be change the contrast of the colors depending upon alpha:
![alpha_0 3](https://user-images.githubusercontent.com/11410385/46409428-d1a08a00-c715-11e8-8eb0-a6dd0af15eb5.png)

Any objections of not varying ```alpha``` for continuous colors overlay ?



Discussion:
No we should indeed vary  `alpha` according to user requests. Thx for sharing.
Trying to find a good alpha value by default for both continuous overlays and filled contours.

**alpha: 0.5**
![alpha_0 5_con](https://user-images.githubusercontent.com/11410385/46909982-22955700-cf3c-11e8-80bb-1d866da0ecbe.png)
![alpha_0 5_contours](https://user-images.githubusercontent.com/11410385/46909983-22955700-cf3c-11e8-9a89-44211aeffb6e.png)



**alpha:0.7**
![alpha_0 7_con](https://user-images.githubusercontent.com/11410385/46909987-45c00680-cf3c-11e8-8d60-acaeec688428.png)
![alpha_0 7_contours](https://user-images.githubusercontent.com/11410385/46909988-45c00680-cf3c-11e8-869c-d70116ab5670.png)

Which value should I prefer as default ?

0.5 or 0.7
Without the outlines, I think that .5 lacks contrast, so I'd for .7 by default.
With the outlines, both are OK.
For me .7 too and this is default in plot_roi and plot_glass_brain as well. I will open a PR.

Resolving patch:
diff --git a/nilearn/plotting/img_plotting.py b/nilearn/plotting/img_plotting.py
--- a/nilearn/plotting/img_plotting.py
+++ b/nilearn/plotting/img_plotting.py
@@ -704,7 +704,7 @@ def plot_prob_atlas(maps_img, bg_img=MNI152TEMPLATE, view_type='auto',
                     draw_cross=True, black_bg='auto', dim='auto',
                     colorbar=False,
                     cmap=plt.cm.gist_rainbow, vmin=None, vmax=None,
-                    alpha=0.5, anat_img=None, **kwargs):
+                    alpha=0.7, anat_img=None, **kwargs):
     """ Plot the probabilistic atlases onto the anatomical image
         by default MNI template
 
@@ -885,7 +885,7 @@ def plot_prob_atlas(maps_img, bg_img=MNI152TEMPLATE, view_type='auto',
 
         if view_type == 'continuous':
             display.add_overlay(map_img, threshold=thr,
-                                cmap=cm.alpha_cmap(color))
+                                cmap=cm.alpha_cmap(color), alpha=alpha)
         else:
             display.add_contours(map_img, levels=[thr],
                                  linewidths=linewidths,


Test patch:
Repository: nilearn/nilearn

Issue:
Brainomics/Localizer
In the Nilearn documentation, may I ask you associate an additional reference to the Brainomics/Localizer dataset?
[Papadopoulos Orfanos D, Michel V, Schwartz Y, Pinel P, Moreno A, Le Bihan D, Frouin V, _The Brainomics/Localizer database_, **NeuroImage**, Volume 144, Part B, January 2017, Pages 309-314](https://doi.org/10.1016/j.neuroimage.2015.09.052)

This would be the part of the documentation to update:
[7.2.19. nilearn.datasets.fetch_localizer_contrasts](https://nilearn.github.io/modules/generated/nilearn.datasets.fetch_localizer_contrasts.html)




Discussion:
Sounds good. Can you send a pull request to the documentation?

Sure, will do.

Then perhaps we can discuss how to move the dataset elsewhere. Indeed the _Brainomics/Localizer_ server is a little bit short on disk space, which results in multiple and successive data requests to fail for lack of disk space for the generated ZIP files - a kind of “denial of service attack”.
Time permitting I may create a DOI for the published dataset - a few years after the fact...

Resolving patch:
diff --git a/nilearn/datasets/func.py b/nilearn/datasets/func.py
--- a/nilearn/datasets/func.py
+++ b/nilearn/datasets/func.py
@@ -666,7 +666,7 @@ def fetch_miyawaki2008(data_dir=None, url=None, resume=True, verbose=1):
 def fetch_localizer_contrasts(contrasts, n_subjects=None, get_tmaps=False,
                               get_masks=False, get_anats=False,
                               data_dir=None, url=None, resume=True, verbose=1):
-    """Download and load Brainomics Localizer dataset (94 subjects).
+    """Download and load Brainomics/Localizer dataset (94 subjects).
 
     "The Functional Localizer is a simple and fast acquisition
     procedure based on a 5-minute functional magnetic resonance
@@ -679,8 +679,11 @@ def fetch_localizer_contrasts(contrasts, n_subjects=None, get_tmaps=False,
     Functional Localizer page."
     (see http://brainomics.cea.fr/localizer/)
 
-    "Scientific results obtained using this dataset are described in
-    Pinel et al., 2007" [1]
+    You may cite Papadopoulos Orfanos, Dimitri, *et al.* when using this
+    dataset [1].
+
+    Scientific results obtained using this dataset are described in
+    Pinel *et al.*, 2007 [2].
 
     Parameters
     ----------
@@ -800,10 +803,14 @@ def fetch_localizer_contrasts(contrasts, n_subjects=None, get_tmaps=False,
 
     References
     ----------
-    Pinel, Philippe, et al.
+    [1] Papadopoulos Orfanos, Dimitri, et al.
+    "The Brainomics/Localizer database."
+    NeuroImage 144.B (2017): 309.
+
+    [2] Pinel, Philippe, et al.
     "Fast reproducible identification and large-scale databasing of
     individual functional cognitive networks."
-    BMC neuroscience 8.1 (2007): 91.
+    BMC Neuroscience 8.1 (2007): 91.
 
     See Also
     ---------


Test patch:
Repository: nilearn/nilearn

Issue:
line_width param in view_connectome has no effect
The parameter `line_width` in `html_connectome.view_connectome()` is not associated with any functionality.
Should we remove it or is there a reason for it to be there?


Discussion:
that seems to be a bug introduced by #1899 . I'll look into it

Resolving patch:
diff --git a/nilearn/plotting/html_connectome.py b/nilearn/plotting/html_connectome.py
--- a/nilearn/plotting/html_connectome.py
+++ b/nilearn/plotting/html_connectome.py
@@ -159,6 +159,7 @@ def view_connectome(adjacency_matrix, node_coords, edge_threshold=None,
     connectome_info = _get_connectome(
         adjacency_matrix, node_coords, threshold=edge_threshold, cmap=edge_cmap,
         symmetric_cmap=symmetric_cmap, marker_size=node_size)
+    connectome_info['line_width'] = linewidth
     return _make_connectome_html(connectome_info)
 
 


Test patch:
Repository: nilearn/nilearn

Issue:
plot_glass_brain fails to show the colorbar when images have np.inf
Code to reproduce:

```python
import nibabel
from nilearn import plotting
from nilearn.plotting.tests.test_img_plotting import _generate_img

img = _generate_img()
data = img.get_data()

data[6, 5, 2] = np.inf
img = nibabel.Nifti1Image(data, np.eye(4))
plotting.plot_glass_brain(img, colorbar=True)
```
Whereas it is not the case:

- when ```colorbar=False``` with plot_glass_brain
- with plot_stat_map with both colorbar= True or False 


Discussion:
cc @ja-che

Resolving patch:
diff --git a/nilearn/plotting/img_plotting.py b/nilearn/plotting/img_plotting.py
--- a/nilearn/plotting/img_plotting.py
+++ b/nilearn/plotting/img_plotting.py
@@ -1148,14 +1148,14 @@ def plot_glass_brain(stat_map_img,
         stat_map_img = _utils.check_niimg_3d(stat_map_img, dtype='auto')
         if plot_abs:
             cbar_vmin, cbar_vmax, vmin, vmax = _get_colorbar_and_data_ranges(
-                _safe_get_data(stat_map_img),
+                _safe_get_data(stat_map_img, ensure_finite=True),
                 vmax,
                 symmetric_cbar,
                 kwargs,
                 0)
         else:
             cbar_vmin, cbar_vmax, vmin, vmax = _get_colorbar_and_data_ranges(
-                _safe_get_data(stat_map_img),
+                _safe_get_data(stat_map_img, ensure_finite=True),
                 vmax,
                 symmetric_cbar,
                 kwargs)


Test patch:
diff --git a/nilearn/plotting/tests/test_img_plotting.py b/nilearn/plotting/tests/test_img_plotting.py
--- a/nilearn/plotting/tests/test_img_plotting.py
+++ b/nilearn/plotting/tests/test_img_plotting.py
@@ -999,3 +999,13 @@ def test_display_methods_with_display_mode_tiled():
     display.add_edges(img, color='c')
     display.add_contours(img, contours=2, linewidth=4,
                          colors=['limegreen', 'yellow'])
+
+
+def test_plot_glass_brain_colorbar_having_nans():
+    img = _generate_img()
+    data = img.get_data()
+
+    data[6, 5, 2] = np.inf
+    img = nibabel.Nifti1Image(data, np.eye(4))
+    plot_glass_brain(img, colorbar=True)
+    plt.close()
Repository: nilearn/nilearn

Issue:
scipy.misc.imread() replaced by scipy.imageio.imread() in v1.2
`scipy.misc.imread()` was deprecatd in SciPy 1.0 & replaced in SciPy 1.2 by `scipy.imageio.imread()`

https://docs.scipy.org/doc/scipy-1.2.1/reference/generated/scipy.misc.imread.html

This is causing failures in CircleCI. 

I will work on this once PR  #2076 doctest problem has been addressed, since we need this issue to be resolved before it can be merged. Intended today.


Discussion:

Resolving patch:
diff --git a/examples/02_decoding/plot_haxby_stimuli.py b/examples/02_decoding/plot_haxby_stimuli.py
--- a/examples/02_decoding/plot_haxby_stimuli.py
+++ b/examples/02_decoding/plot_haxby_stimuli.py
@@ -7,7 +7,6 @@
 Cortex" (Science 2001)
 """
 
-from scipy.misc import imread
 import matplotlib.pyplot as plt
 
 from nilearn import datasets
@@ -16,22 +15,19 @@
 haxby_dataset = datasets.fetch_haxby(subjects=[], fetch_stimuli=True)
 stimulus_information = haxby_dataset.stimuli
 
-for stim_type in sorted(stimulus_information.keys()):
-    if stim_type == b'controls':
-        # skip control images, there are too many
-        continue
-
-    file_names = stimulus_information[stim_type]
-
-    plt.figure()
-    for i in range(48):
-        plt.subplot(6, 8, i + 1)
-        try:
-            plt.imshow(imread(file_names[i]), cmap=plt.cm.gray)
-        except:
-            # just go to the next one if the file is not present
-            pass
-        plt.axis("off")
-    plt.suptitle(stim_type)
+for stim_type in stimulus_information:
+    # skip control images, there are too many
+    if stim_type != 'controls':
+
+        file_names = stimulus_information[stim_type]
+
+        fig, axes = plt.subplots(6, 8)
+        fig.suptitle(stim_type)
+
+        for img_path, ax in zip(file_names, axes.ravel()):
+            ax.imshow(plt.imread(img_path), cmap=plt.cm.gray)
+
+        for ax in axes.ravel():
+            ax.axis("off")
 
 show()


Test patch:
Repository: nilearn/nilearn

Issue:
Some fetchers are not verbose
The following fetchers have `verbose=0` by default :
- `fetch_development_fmri`
- `fetch_mixed_gambles`

It would be nice to be consistent with the other fetchers where `verbose=1`.


Discussion:

Resolving patch:
diff --git a/nilearn/datasets/func.py b/nilearn/datasets/func.py
--- a/nilearn/datasets/func.py
+++ b/nilearn/datasets/func.py
@@ -1360,7 +1360,7 @@ def _load_mixed_gambles(zmap_imgs):
 
 
 def fetch_mixed_gambles(n_subjects=1, data_dir=None, url=None, resume=True,
-                        return_raw_data=False, verbose=0):
+                        return_raw_data=False, verbose=1):
     """Fetch Jimura "mixed gambles" dataset.
 
     Parameters
@@ -1380,7 +1380,7 @@ def fetch_mixed_gambles(n_subjects=1, data_dir=None, url=None, resume=True,
     resume: bool, optional (default True)
         If true, try resuming download if possible.
 
-    verbose: int, optional (default 0)
+    verbose: int, optional (default 1)
         Defines the level of verbosity of the output.
 
     return_raw_data: bool, optional (default True)
@@ -1995,7 +1995,7 @@ def _fetch_development_fmri_functional(participants, data_dir, url, verbose):
 
 
 def fetch_development_fmri(n_subjects=None, reduce_confounds=True,
-                           data_dir=None, resume=True, verbose=0):
+                           data_dir=None, resume=True, verbose=1):
     """Fetch movie watching based brain development dataset (fMRI)
 
     The data is downsampled to 4mm resolution for convenience. The origin of
@@ -2024,7 +2024,7 @@ def fetch_development_fmri(n_subjects=None, reduce_confounds=True,
     resume: bool, optional (default True)
         Whether to resume download of a partly-downloaded file.
 
-    verbose: int, optional (default 0)
+    verbose: int, optional (default 1)
         Defines the level of verbosity of the output.
 
     Returns


Test patch:
Repository: nilearn/nilearn

Issue:
Bug in _uncompress_file
Hi!
(...still nilearn-sprinting in the train back to Marseille ;) )

I found a bug when trying to download .tar.gz archive files from osf.

I got an error when using _fetch_files:

```
from nilearn.datasets.utils import _fetch_files
opts = {'uncompress': True}
data_dir = '~/nilearn_data'
url = 'https://osf.io/vym9k/download'
_fetch_files(data_dir, [('sphere_right.gii', url, opts)])
```

After digging, I realized the problem is in _uncompress_file: the temporary downloaded file is actually called 'download' on disk (because of the url that's given by osf), and  _uncompress_file does not extract the files if the archive was a .tar.gz one (it does not return an error, and it erases the 'download' file)

Note that:
- if the archive is a zip file, everything works... (as in the fetch_icbm152_2009 function); the temporary file is also called 'download' on disk, but _uncompress_file handles it properly
- if the file on disk is actually called 'whatever.tar.gz' and you run _uncompress_file on it, it also handles it properly

Soooooooooo, to reproduce the problem, the easiest is that:
1. you type https://osf.io/vym9k/download in your browser to get the file
2. you rename the file manually in your unix shell
```
> mv sphere_mesh.tar.gz download
```
3. you try to use _uncompress_file on it
```
from nilearn.datasets.utils import _uncompress_file
_uncompress_file('download')
```
It will: 1. not extract the files in the archive, 2. erase the 'download' file, 3. not return an error.

I hope this is clear enough...

Sylvain




Discussion:
@SylvainTakerkart  asked me to replace on OSF the two .tar.gz files with the .zip files and send the two new links.
On it.


InterTVA: https://osf.io/aekp7/download
sphere mesh: https://osf.io/b79fy/download
Thanks! I can then move forward with writing my fetchers (just created a PR for the sphere meshes)...

But this bug will still need to be looked at at some point...
~File an issue, with all the details.~

Edit: Sorry I thought this was a PR.

Resolving patch:
diff --git a/nilearn/datasets/utils.py b/nilearn/datasets/utils.py
--- a/nilearn/datasets/utils.py
+++ b/nilearn/datasets/utils.py
@@ -336,9 +336,13 @@ def _uncompress_file(file_, delete_archive=True, verbose=1):
             processed = True
         elif ext == '.gz' or header.startswith(b'\x1f\x8b'):
             import gzip
-            gz = gzip.open(file_)
             if ext == '.tgz':
                 filename = filename + '.tar'
+            elif ext == '':
+                # For gzip file, we rely on the assumption that there is an extenstion
+                shutil.move(file_, file_ + '.gz')
+                file_ = file_ + '.gz'
+            gz = gzip.open(file_)
             out = open(filename, 'wb')
             shutil.copyfileobj(gz, out, 8192)
             gz.close()


Test patch: