# HG changeset patch # User Yoshua Bengio # Date 1210193886 14400 # Node ID f959ad58facc492787c281b135506fa8ba725d37 # Parent 7d8b3d6dd4e9edde583f30a9d8ee749c4942218d# Parent 4efe6d36c061c2580c05d780888dd44bf0b75f81 Automated merge with ssh://p-omega1@lgcm.iro.umontreal.ca/tlearn diff -r 4efe6d36c061 -r f959ad58facc dataset.py --- a/dataset.py Wed May 07 16:57:48 2008 -0400 +++ b/dataset.py Wed May 07 16:58:06 2008 -0400 @@ -355,13 +355,13 @@ Sub-classes which implement finite-length datasets should redefine this method. Some methods only make sense for finite-length datasets. """ - return sys.maxint + return maxint def is_unbounded(self): """ Tests whether a dataset is unbounded (e.g. a stream). """ - return len(self)==sys.maxint + return len(self)==maxint def hasFields(self,*fieldnames): """ @@ -767,7 +767,7 @@ # concatenate all the fields of the minibatches return reduce(LookupList.__add__,[iterator.next() for iterator in self.iterators]) - assert self.hasfields(fieldnames) + assert self.hasFields(*fieldnames) # find out which underlying datasets are necessary to service the required fields # and construct corresponding minibatch iterators if fieldnames: diff -r 4efe6d36c061 -r f959ad58facc test_dataset.py --- a/test_dataset.py Wed May 07 16:57:48 2008 -0400 +++ b/test_dataset.py Wed May 07 16:58:06 2008 -0400 @@ -320,11 +320,11 @@ # - 'fieldtypes': a list of types (one per field) #* ds1 | ds2 | ds3 == ds.hstack([ds1,ds2,ds3])#???? -# i=0 -# for example in hstack([ds('x'),ds('y'),ds('z')]): -# example==ds[i] -# i+=1 -# del i,example + i=0 + for example in hstack([ds('x'),ds('y'),ds('z')]): + example==ds[i] + i+=1 + del i,example #* ds1 & ds2 & ds3 == ds.vstack([ds1,ds2,ds3])#???? @@ -401,11 +401,7 @@ print "test_ArrayFieldsDataSet" raise NotImplementedError() -import pmat - -load_pmat_as_array_dataset("tmp.pmat") - test1() test_LookupList() test_ArrayDataSet() - +#test pmat.py