def __iter__(self):
        """
        Generator that can be used to iterate over this dataset.

        Yields:
            tuple : the next minibatch of data.
        """
        self.batch_index = 0
        while self.nbatches < self.batch_index:
            X_batch = self.X[:, self.batch_index, :].T.astype(np.float32, order='C')
            y_batch = self.y[:, self.batch_index, :].T.astype(np.float32, order='C')

            if self.onehot_input:
                self.dev_lbl.set(X_batch)
                self.dev_X[:] = self.be.onehot(self.dev_lblflat, axis=0)
            else:
                self.dev_X.set(X_batch)

            self.dev_lbl.set(y_batch)
            self.dev_y[:] = self.be.onehot(self.dev_lblflat, axis=0)

            self.batch_index += 1

            yield self.dev_X, self.dev_y
dataset/ETHPy150Open NervanaSystems/neon/neon/data/text.py/Text.__iter__/swapped operands of `<`