# HG changeset patch # User Frederic Bastien # Date 1213717261 14400 # Node ID d96be0eba3ccd7ae83a2f5cf7cbc6d8ccfd94434 # Parent aa8aff6abbf7aa2dde0ed711736c368f8901ef17# Parent 7d4792fc28ae86ea4307abd844f3ef8d20825e0e Automated merge with ssh://projects@lgcm.iro.umontreal.ca/hg/pylearn diff -r aa8aff6abbf7 -r d96be0eba3cc dataset.py --- a/dataset.py Mon Jun 16 17:26:51 2008 -0400 +++ b/dataset.py Tue Jun 17 11:41:01 2008 -0400 @@ -721,7 +721,12 @@ assert self.hasFields(*fieldnames) return self.src.minibatches_nowrap(fieldnames,minibatch_size,n_batches,offset) def __getitem__(self,i): - return FieldsSubsetDataSet(self.src[i],self.new_fieldnames) +# return FieldsSubsetDataSet(self.src[i],self.new_fieldnames) + complete_example = self.src[i] + return Example(self.new_fieldnames, + [complete_example[field] + for field in self.src_fieldnames]) + class DataSetFields(Example):