898a9387984d8434245618eda47a6e3f052bbba0,niftynet/utilities/user_parameters_regex.py,,match_array,#Any#Any#,49

Before Change


    regex = re.compile(STATEMENT)
    matched_str = regex.match(string_input)
    if matched_str:
        filtered_groups = list(filter(None, matched_str.groups()))
        if not filtered_groups:
            return ()
        try:

After Change


    regex = re.compile(STATEMENT)
    matched_str = regex.match(string_input)
    if matched_str:
        filtered_groups = [matched for matched in matched_str.groups()
                           if matched is not None]
        if not filtered_groups:
            return ()
        try:
            values = [v.strip() for v in filtered_groups[0].split(",")]
        except IndexError:
            raise ValueError(
                "unrecognised input string {}".format(string_input))
        if type_str == "int":
            return tuple(int(val) for val in values)
        if type_str == "float":
            return tuple(float(val) for val in values)
        if type_str == "str":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NifTK/NiftyNet
Commit Name: 898a9387984d8434245618eda47a6e3f052bbba0
Time: 2018-03-20
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/utilities/user_parameters_regex.py
Class Name:
Method Name: match_array


Project Name: NifTK/NiftyNet
Commit Name: 14f7fd88d24cf31a466726fc89060a4b7778e2e6
Time: 2017-09-04
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/image_window.py
Class Name:
Method Name: _read_window_sizes


Project Name: dmlc/gluon-nlp
Commit Name: 03b0e7061cf477fbeccb9c128ee76603df582d86
Time: 2018-09-04
Author: leonard@lausen.nl
File Name: scripts/word_embeddings/evaluate_pretrained.py
Class Name:
Method Name: load_embedding_from_path