d750d66fb998a44316000908f213ae73c53de97f,examples/shrec17/dataset.py,CacheNPY,__call__,#CacheNPY#Any#,194

Before Change


            except OSError: exists[i] = False

        print("transform...", end="\r")
        try:
            img = self.transform(file_path)
        except:
            print(file_path)
            raise
        np.save(npy_path.format(exists.index(False)), img)

        return img

After Change


            return img

        output = []
        for i in range(self.repeat):
            try:
                img = np.load(npy_path.format(i))
            except (OSError, FileNotFoundError):
                img = self.check_trans(file_path)
                np.save(npy_path.format(i), img)
            output.append(img)

        return output

    def __repr__(self):
        return self.__class__.__name__ + "(prefix={0}, transform={1})".format(self.prefix, self.transform)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: jonas-koehler/s2cnn
Commit Name: d750d66fb998a44316000908f213ae73c53de97f
Time: 2018-03-03
Author: geiger.mario@gmail.com
File Name: examples/shrec17/dataset.py
Class Name: CacheNPY
Method Name: __call__


Project Name: descarteslabs/descarteslabs-python
Commit Name: 0a683f79d74ac0c3aa2f1551d0b7123f06c49735
Time: 2019-10-30
Author: nik@descarteslabs.com
File Name: docs/examples/run_keras_model.py
Class Name:
Method Name:


Project Name: vatlab/SoS
Commit Name: 5456821a4abed83c2e7f57c0bdbf1af093cbddb9
Time: 2017-05-11
Author: ben.bog@gmail.com
File Name: sos/hosts.py
Class Name: LocalHost
Method Name: prepare_task