Coverage for nilearn/input_data/__init__.py: 0%

11 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-16 12:32 +0200

1""" 

2The :mod:`nilearn.input_data` module used to include masker objects. 

3 

4It is deprecated since release 0.9.0 in favor of the 

5:mod:`~nilearn.maskers` module. 

6Please consider updating your code: 

7.. code-blocks::python 

8 from nilearn.input_data import NiftiMasker 

9becomes: 

10.. code-blocks::python 

11 from nilearn.maskers import NiftiMasker 

12Note that all imports that used to work will continue to do so with 

13a simple warning at least until release 0.13.0. 

14""" 

15 

16import warnings 

17 

18from nilearn._utils.logger import find_stack_level 

19 

20message = ( 

21 "The import path 'nilearn.input_data' is deprecated in version 0.9. " 

22 "Importing from 'nilearn.input_data' will be possible at least until " 

23 "release 0.13.0. Please import from 'nilearn.maskers' instead." 

24) 

25warnings.warn(message, DeprecationWarning, stacklevel=find_stack_level()) 

26 

27 

28from nilearn.input_data.base_masker import BaseMasker 

29 

30from .multi_nifti_masker import MultiNiftiMasker 

31from .nifti_labels_masker import NiftiLabelsMasker 

32from .nifti_maps_masker import NiftiMapsMasker 

33from .nifti_masker import NiftiMasker 

34from .nifti_spheres_masker import NiftiSpheresMasker 

35 

36__all__ = [ 

37 "BaseMasker", 

38 "MultiNiftiMasker", 

39 "NiftiLabelsMasker", 

40 "NiftiMapsMasker", 

41 "NiftiMasker", 

42 "NiftiSpheresMasker", 

43]