3d53143678cf70ed79772f1b6e384fa33abb55cf,nilearn/__init__.py,,_check_dependencies,#,15

Before Change


    except ImportError:
        raise ImportError("Numpy could not be found,"
                          " please install it properly to use nilearn.")
    if not LooseVersion(numpy.__version__) >= LooseVersion("1.6.0"):
        raise ImportError("A numpy version of at least 1.6 is required "
                          "to use nilearn. %s was found. Please upgrade numpy."
                          % numpy.__version__)

    try:
        import scipy
    except ImportError:
        raise ImportError("Scipy could not be found,"
                          " please install it properly to use nilearn.")
    if not LooseVersion(scipy.__version__) >= LooseVersion("0.9.0"):
        raise ImportError("A scipy version of at least 0.9 is required "
                          "to use nilearn. %s was found. Please upgrade scipy."
                          % scipy.__version__)

    try:
        import sklearn
    except ImportError:
        raise ImportError("Scikit-learn could not be found,"
                          " please install it properly to use nilearn.")
    if not LooseVersion(sklearn.__version__) >= LooseVersion("0.10"):
        raise ImportError(
            "A scikit-learn version of at least 0.10 is required"
            " to use nilearn. %s was found. Please upgrade scikit-learn."
            % sklearn.__version__)

    try:
        import nibabel
    except ImportError:

After Change




def _check_dependencies():
    _required_module_versions = [("numpy", "1.6.0"),
                                 ("scipy", "0.9.0"),
                                 ("sklearn", "0.10"),
                                 ("nibabel", "1.1.0")]

    for module_name, minimum_version in _required_module_versions:
        _import_module_with_version_check(module_name, minimum_version)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: nilearn/nilearn
Commit Name: 3d53143678cf70ed79772f1b6e384fa33abb55cf
Time: 2014-07-16
Author: loic.esteve@ymail.com
File Name: nilearn/__init__.py
Class Name:
Method Name: _check_dependencies


Project Name: matthewwithanm/django-imagekit
Commit Name: a9895f335a5323b4bee7d6cbcffffbe826645c03
Time: 2011-09-08
Author: matthew@exanimo.com
File Name: imagekit/models.py
Class Name: ImageModelBase
Method Name: __init__


Project Name: tyarkoni/pliers
Commit Name: 5cb7f069664230c47f7db71301a67bc135516e28
Time: 2017-09-28
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/audio.py
Class Name: LibrosaFeatureExtractor
Method Name: __init__