def get_training_arrays(schema, table, ids, column, sample_rate, window_length,
                        window_step, label):
    training_array = []
    for id_ in ids:
        trace = psda.generate_appliance_trace(schema, table, column, id_,
                                              sample_rate)
        id_array_chunk = trace_windows(trace, window_length, window_step)
        training_array.append(id_array_chunk)
    training_array = np.concatenate(training_array, axis=0)
    label_array = np.array([label for _ in xrange(training_array.shape[0])])
    return training_array, label_array
def get_training_arrays(schema, table, ids, column, sample_rate,
        window_length, window_step,label):
    training_array = []
    for id_ in ids:
        trace = psda.generate_appliance_trace(
            schema, table, column, id_, sample_rate)
        id_array_chunk = trace_windows(trace,window_length,window_step)
        training_array.append(id_array_chunk)
    training_array = np.concatenate(training_array,axis=0)
    label_array = np.array([label for _ in xrange(training_array.shape[0])])
    return training_array,label_array