f186e416fdca5ccae5c2df52a556885baccd5474,generator.py,,data_generator,#,47

Before Change


                    y[y > 0] = 1
                else:
                    raise NotImplementedError("Multi-class labels are not yet implemented")
                yield x, y

After Change


                yield convert_data(x_list, y_list, binary=binary)
                x_list = list()
                y_list = list()
        if len(x_list) > 0:
            yield convert_data(x_list, y_list, binary=binary)


def convert_data(x_list, y_list, binary=True):
    x = np.asarray(x_list)
    y = np.asarray(y_list)
    if binary:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ellisdg/3DUnetCNN
Commit Name: f186e416fdca5ccae5c2df52a556885baccd5474
Time: 2017-04-14
Author: david.ellis@unmc.edu
File Name: generator.py
Class Name:
Method Name: data_generator


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_tokens


Project Name: nilmtk/nilmtk
Commit Name: 59a4736028fea991396643e361d0488c7c96736d
Time: 2014-12-02
Author: jack-list@xlk.org.uk
File Name: nilmtk/elecmeter.py
Class Name: ElecMeter
Method Name: power_series