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


            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 = {
            "type": self.args.name,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: oddt/oddt
Commit Name: e626254b74ecb6dc71396c1b35237b53a5e35163
Time: 2017-08-23
Author: maciek@wojcikowski.pl
File Name: oddt/datasets.py
Class Name: pdbbind
Method Name: __init__


Project Name: EducationalTestingService/skll
Commit Name: ca10c185d94470054d693f19e7691523dbe3ec55
Time: 2019-03-05
Author: jbiggs@ets.org
File Name: skll/data/readers.py
Class Name: NDJReader
Method Name: _sub_read