comparison dataset.py @ 125:7d8b3d6dd4e9

bugfix
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Wed, 07 May 2008 16:22:28 -0400
parents 8b520423d4ee
children ee5507af2c60 fa752c55aa09
comparison
equal deleted inserted replaced
124:9c4f522526bf 125:7d8b3d6dd4e9
765 return self 765 return self
766 def next(self): 766 def next(self):
767 # concatenate all the fields of the minibatches 767 # concatenate all the fields of the minibatches
768 return reduce(LookupList.__add__,[iterator.next() for iterator in self.iterators]) 768 return reduce(LookupList.__add__,[iterator.next() for iterator in self.iterators])
769 769
770 assert self.hasfields(fieldnames) 770 assert self.hasFields(*fieldnames)
771 # find out which underlying datasets are necessary to service the required fields 771 # find out which underlying datasets are necessary to service the required fields
772 # and construct corresponding minibatch iterators 772 # and construct corresponding minibatch iterators
773 if fieldnames: 773 if fieldnames:
774 datasets=set([]) 774 datasets=set([])
775 fields_in_dataset=dict([(dataset,[]) for dataset in datasets]) 775 fields_in_dataset=dict([(dataset,[]) for dataset in datasets])