changeset 340:d96be0eba3cc

Automated merge with ssh://projects@lgcm.iro.umontreal.ca/hg/pylearn
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Tue, 17 Jun 2008 11:41:01 -0400
parents aa8aff6abbf7 (current diff) 7d4792fc28ae (diff)
children 9c08e3af975e
files dataset.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):