9f67a534bce1063693d7716df11311e7584b6786,libraries/python/classification_compare.py,OutputCompare,getData,#OutputCompare#Any#,47

Before Change



    def getData(self, filename):
        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



    def getData(self, filename):
        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()

    def writeOneResult(self, values, data, metric, unit):
        entry = {
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

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: Qiskit/qiskit-aqua
Commit Name: d892fb853c4c296539034d2dbaf304c0d06a357d
Time: 2018-07-06
Author: 34400304+liupibm@users.noreply.github.com
File Name: qiskit_acqua/ising/graphpartition.py
Class Name:
Method Name: sample_most_likely


Project Name: Qiskit/qiskit-aqua
Commit Name: a194557ba754f9b14d473ff9e39a2bc2449e58c1
Time: 2018-07-06
Author: chenrich@us.ibm.com
File Name: qiskit_acqua/ising/maxcut.py
Class Name:
Method Name: sample_most_likely