248fa57af17b42deec9c818eb83aa71e63d50354,osmnx/io.py,,_convert_edge_attr_types,#Any#Any#,254
Before Change
// parse grade attrs to float: should always have only 1 value each
if "grade" in data:
data["grade"] = float(data["grade"])
if "grade_abs" in data:
data["grade_abs"] = float(data["grade_abs"])
// these attributes might have a single value, or a list if edge"s
// topology was simplified
for attr in [
"highway",
"name",
"bridge",
After Change
// convert to float any possible OSMnx-added edge attributes, which may
// have multiple values if graph was simplified after they were added
for attr in ["grade", "grade_abs", "bearing", "speed_kph", "travel_time"]:
if attr in data:
if data[attr].startswith("[") and data[attr].endswith("]"):
// if it"s a list, eval it then convert each item to float
data[attr] = [float(a) for a in ast.literal_eval(data[attr])]
else:
data[attr] = float(data[attr])
// these attributes might have a single value, or a list if edge"s
// topology was simplified
for attr in [
"highway",
"name",
"bridge",
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: gboeing/osmnx
Commit Name: 248fa57af17b42deec9c818eb83aa71e63d50354
Time: 2020-06-08
Author: boeing@usc.edu
File Name: osmnx/io.py
Class Name:
Method Name: _convert_edge_attr_types
Project Name: Qiskit/qiskit-aqua
Commit Name: 4f804b0e60cefa3048e0a485510a682f7bbaf604
Time: 2018-10-18
Author: manoel@us.ibm.com
File Name: qiskit_aqua/quantumalgorithm.py
Class Name: QuantumAlgorithm
Method Name: setup_quantum_backend
Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 994004cca3b3153cc9c5b2d1ff0f6c4ba1b3cd13
Time: 2020-01-29
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/preprocess/_preprocworker.py
Class Name: PreprocWorker
Method Name: _task_lemmatize