# HG changeset patch # User Frederic Bastien # Date 1212071459 14400 # Node ID ae1d85aca8586a1a1885bd133b39f6e8f9d0d7b3 # Parent 584ad7c558760f480f8a45aa3a43e364e122799f optimization in ArrayDataSet::__iter__ diff -r 584ad7c55876 -r ae1d85aca858 dataset.py --- a/dataset.py Wed May 28 14:16:32 2008 -0400 +++ b/dataset.py Thu May 29 10:30:59 2008 -0400 @@ -1054,6 +1054,8 @@ assert offset>=0 and offset=self.dataset.data.shape[0]: raise StopIteration sub_data = self.dataset.data[self.current] - self.minibatch._values = [sub_data[self.dataset.fields_columns[f]] for f in self.minibatch._names] + self.minibatch._values = [sub_data[c] for c in self.columns] + self.current+=self.minibatch_size return self.minibatch