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:
            values = [v.strip() for v in filtered_groups[0].split(",")]

After Change


            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":
            return tuple(values)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: f27fc2c9841b582b7280d00abca832b09954a7fc
Time: 2017-08-08
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/image_window.py
Class Name:
Method Name: read_window_sizes


Project Name: keras-team/keras
Commit Name: 97031ed8f6afaf26a21dd98bb0bfdb4cacc65ca2
Time: 2018-01-11
Author: myutwo150@users.noreply.github.com
File Name: keras/layers/wrappers.py
Class Name: Bidirectional
Method Name: compute_output_shape