# HG changeset patch # User Thierry Bertin-Mahieux # Date 1213649051 14400 # Node ID dada08a6adb843f79741f6b026a683b18fd3b686 # Parent 52aa031e1fe3577a2aad0b32e8af3dd19215feb5 redone my previous hack in MinibatchToSingleExampleIterator, tests should work again diff -r 52aa031e1fe3 -r dada08a6adb8 dataset.py --- a/dataset.py Mon Jun 16 16:38:03 2008 -0400 +++ b/dataset.py Mon Jun 16 16:44:11 2008 -0400 @@ -242,9 +242,9 @@ if not self.minibatch: names = size1_minibatch.keys() # next lines are a hack, but there was problem when we were getting [array(327)] for instance - if len(size1_minibatch.values()[0].shape) > 0 : + try: values = [value[0] for value in size1_minibatch.values()] - else : + except : values = [value for value in size1_minibatch.values()] self.minibatch = Example(names,values) else: