544989c7ff9922e04bddad72c1b13156ce344ace,mne/rank.py,,_get_rank_sss,#Any#,197

Before Change


    del inst

    max_infos = list()
    for proc_info in info.get("proc_history", list()):
        max_info = proc_info.get("max_info")
        if max_info is not None:
            if len(max_info) > 0:
                max_infos.append(max_info)
            elif len(max_info) > 1:
                logger.info("found multiple SSS records. Using the first.")
            elif len(max_info) == 0:
                raise ValueError(
                    "Did not find any SSS record. You should use data-based "
                    "rank estimate instead")
    if len(max_infos) > 0:
        max_info = max_infos[0]
    else:
        raise ValueError("There is no `max_info` here. Sorry.")

After Change


    info = inst if isinstance(inst, Info) else inst.info
    del inst

    proc_info = info.get("proc_history", [])
    if len(proc_info) > 1:
        logger.info("Found multiple SSS records. Using the first.")
    if len(proc_info) == 0 or "max_info" not in proc_info[0] or \
            "in_order" not in proc_info[0]["max_info"]["sss_info"]:
        raise ValueError(
            "Did not find any SSS record. You should use data-based "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: mne-tools/mne-python
Commit Name: 544989c7ff9922e04bddad72c1b13156ce344ace
Time: 2019-02-15
Author: alexandre.gramfort@m4x.org
File Name: mne/rank.py
Class Name:
Method Name: _get_rank_sss


Project Name: automl/SMAC3
Commit Name: 157135dd7b6f821b789c0e8da8013305e90ac962
Time: 2019-10-17
Author: ashraaghav@gmail.com
File Name: smac/intensification/successive_halving.py
Class Name: SuccessiveHalving
Method Name: __init__


Project Name: IDSIA/sacred
Commit Name: 0cd42478586c9cb1febb6b76eea068aac8869a1e
Time: 2018-01-24
Author: dismaldenizen@gmail.com
File Name: sacred/ingredient.py
Class Name: Ingredient
Method Name: __init__


Project Name: prody/ProDy
Commit Name: 8c7303cf0c49de8b8a18a101876f0eed9155ab90
Time: 2018-03-04
Author: jamesmkrieger@gmail.com
File Name: prody/ensemble/functions.py
Class Name:
Method Name: buildPDBEnsemble