222deb6f5e97036274b9ac117582c20bee18d13a,mne/utils/check.py,,_check_rank,#Any#,423

Before Change


                             "got %s" % (rank,))
    elif isinstance(rank, bool):
        raise TypeError(err_msg)
    elif rank is not None and not isinstance(rank, dict):
        try:
            rank = int(operator.index(rank))
        except TypeError:

After Change



def _check_rank(rank):
    Check rank parameter.
    _validate_type(rank, (None, dict, str), "rank")
    if isinstance(rank, str):
        if rank not in ["full", "info"]:
            raise ValueError("rank, if str, must be "full" or "info", "
                             "got %s" % (rank,))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: mne-tools/mne-python
Commit Name: 222deb6f5e97036274b9ac117582c20bee18d13a
Time: 2019-09-26
Author: larson.eric.d@gmail.com
File Name: mne/utils/check.py
Class Name:
Method Name: _check_rank


Project Name: mne-tools/mne-python
Commit Name: 222deb6f5e97036274b9ac117582c20bee18d13a
Time: 2019-09-26
Author: larson.eric.d@gmail.com
File Name: mne/rank.py
Class Name:
Method Name: compute_rank


Project Name: mne-tools/mne-python
Commit Name: 7c1233ba612bdb08d640c924ef4220b2fe13fb71
Time: 2020-09-25
Author: larson.eric.d@gmail.com
File Name: mne/io/reference.py
Class Name:
Method Name: add_reference_channels