changeset 127:f959ad58facc

Automated merge with ssh://p-omega1@lgcm.iro.umontreal.ca/tlearn
author Yoshua Bengio <bengioy@iro.umontreal.ca>
date Wed, 07 May 2008 16:58:06 -0400
parents 7d8b3d6dd4e9 (diff) 4efe6d36c061 (current diff)
children ee5507af2c60
files
diffstat 2 files changed, 9 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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:
--- 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