384e8e0f8a91815568aa3d4c651c8c5e48979262,mltsp/util.py,,cast_model_params,#Any#Any#,92

Before Change


            dest_type = param_entry["type"]
            model_params[k] = dest_type(v)
        // Parse string describing list correctly, eschewing `eval`
        elif param_entry["type"] == list:
            model_params[k] = model_params[k].replace("[", "").replace("]", "")\
                                                              .replace(" ", "")\
                                                              .split(",")
            for i in range(len(model_params[k])):

After Change


                        else:
                            continue
                    except ValueError:
                        continue
                else:
                    break
            if type(model_params[k]) == str and str not in dest_types_list:
                raise(ValueError("Model parameter cannot be cast to expected "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: cesium-ml/cesium
Commit Name: 384e8e0f8a91815568aa3d4c651c8c5e48979262
Time: 2015-12-17
Author: a.crellinquick@gmail.com
File Name: mltsp/util.py
Class Name:
Method Name: cast_model_params


Project Name: mindsdb/mindsdb
Commit Name: 80ab5f2eb06c8023c6ba4b62c054ff04369913f8
Time: 2020-11-12
Author: stpmax@yandex.ru
File Name: tests/integration_tests/flows/test_mongo.py
Class Name: MongoTest
Method Name: setUpClass


Project Name: biotite-dev/biotite
Commit Name: f7e6a5c544859ce6b0d6626e2f815b2db0c7813a
Time: 2019-11-13
Author: patrick.kunzm@gmail.com
File Name: src/biotite/sequence/io/genbank/annotation.py
Class Name:
Method Name: get_annotation