9f67a534bce1063693d7716df11311e7584b6786,libraries/python/classification_compare.py,OutputCompare,getData,#OutputCompare#Any#,47
Before Change
with open(filename, "r") as f:
content = f.read()
batches = content.strip().split("\n")
data = [[float(item) for item in batch .strip().split(",")]
for batch in batches]
return data
After Change
with open(filename, "r") as f:
line = f.readline().strip()
dims_list = [int(dim.strip()) for dim in line.split(",")]
line = f.readline().strip()
content_list = [float(entry.strip()) for entry in line.split(",")]
dims = np.asarray(dims_list)
content = np.asarray(content_list)
data = np.reshape(content, dims)
return data.tolist()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: facebook/FAI-PEP
Commit Name: 9f67a534bce1063693d7716df11311e7584b6786
Time: 2018-12-11
Author: feisun@fb.com
File Name: libraries/python/classification_compare.py
Class Name: OutputCompare
Method Name: getData
Project Name: facebook/FAI-PEP
Commit Name: 9f67a534bce1063693d7716df11311e7584b6786
Time: 2018-12-11
Author: feisun@fb.com
File Name: libraries/python/classification_compare.py
Class Name: OutputCompare
Method Name: getData
Project Name: biolab/orange3
Commit Name: 8d4d199c35f5163ed21ae705a16ce3c8548d60c6
Time: 2012-11-28
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/data/io.py
Class Name: BasketReader
Method Name: prescan_file
Project Name: shibing624/pycorrector
Commit Name: 4e144c9f842d7415d8be5bdbb5912d88ae32cced
Time: 2018-04-16
Author: 507153809@qq.com
File Name: pycorrector/seq2seq/corpus_reader.py
Class Name: CGEDReader
Method Name: read_samples_by_string