# HG changeset patch # User Frederic Bastien # Date 1210009059 14400 # Node ID 7b1f3ad3d60b7f0659462e158fc39d022f957989 # Parent aa9e786ee849e421c29dce429d25d3db50230879 bugfix diff -r aa9e786ee849 -r 7b1f3ad3d60b dataset.py --- a/dataset.py Mon May 05 11:49:40 2008 -0400 +++ b/dataset.py Mon May 05 13:37:39 2008 -0400 @@ -610,7 +610,7 @@ class MinibatchDataSet(DataSet): """ - Turn a LookupList of same-length fields into an example-iterable dataset. + Turn a LookupList of same-length (iterable) fields into an example-iterable dataset. Each element of the lookup-list should be an iterable and sliceable, all of the same length. """ def __init__(self,fields_lookuplist,values_vstack=DataSet().valuesVStack, @@ -636,9 +636,7 @@ return DataSetFields(MinibatchDataSet( Example(self._fields.keys(),[field[i] for field in self._fields])),self.fieldNames()) if type(i) is int: - return DataSetFields(MinibatchDataSet( - Example(self._fields.keys(),[[field[i]] for field in self._fields])),self.fieldNames()) - + return Example(self._fields.keys(),[field[i] for field in self._fields]) if self.hasFields(i): return self._fields[i] assert i in self.__dict__ # else it means we are trying to access a non-existing property