# HG changeset patch # User Frederic Bastien # Date 1210013501 14400 # Node ID 6749d18e11c8ed37ebe8bd5e8feab9e679a84651 # Parent 3fd6879e0f766d27a4e5d89e0da14b4e6c3a72fe bugfix as numpy numpy don't support self.data[[i1,...],[i2,...]] when their is more then two i1 and i2 diff -r 3fd6879e0f76 -r 6749d18e11c8 dataset.py --- a/dataset.py Mon May 05 14:39:04 2008 -0400 +++ b/dataset.py Mon May 05 14:51:41 2008 -0400 @@ -952,7 +952,13 @@ if self.hasFields(key[i]): key[i]=self.fields_columns[key[i]] return MinibatchDataSet(Example(fieldnames, - [self.data[key,self.fields_columns[f]] for f in fieldnames]), + #we must separate differently for list as numpy + # don't support self.data[[i1,...],[i2,...]] + # when their is more then two i1 and i2 + [self.data[key,:][:,self.fields_columns[f]] + if isinstance(self.fields_columns[f],list) else + self.data[key,self.fields_columns[f]] + for f in fieldnames]), self.valuesVStack,self.valuesHStack) # else check for a fieldname