'Takes a list of numpy arrays for data,
and a numpy array for labels.
Converts to minibatches and puts it on the queue.'

def _push_queue(self, data_list, labels):

    num_minibatches = (1 + self.sample_ratio)
    total_size = len(labels)
    slice_size = (total_size / num_minibatches)
    def slicer(x, s):
        idx = range((s * slice_size), ((s + 1) * slice_size))
        return np.take(x, idx, 0)
    for i in range((1 + self.sample_ratio)):
        nddata = [mx.nd.array(slicer(x, i)) for x in data_list]
        ndlabels = mx.nd.array(slicer(labels, i))
        batch = mx.io.DataBatch(nddata, [ndlabels], provide_data=self.provide_data, provide_label=self.provide_label)
        self._sampled_queue.append(batch)
