diff test_dataset.py @ 164:3518710e16ec

don't assume we have an ArrayDataSet
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Mon, 12 May 2008 17:43:53 -0400
parents 45427d4d64b3
children 2a12e7437c56
line wrap: on
line diff
--- a/test_dataset.py	Mon May 12 17:40:06 2008 -0400
+++ b/test_dataset.py	Mon May 12 17:43:53 2008 -0400
@@ -158,8 +158,9 @@
     for x,z in m:
         test_minibatch_field_size(x,m.minibatch_size,len(ds),mi)
         test_minibatch_field_size(z,m.minibatch_size,len(ds),mi)
-        assert (x[:,0:3:2]==z).all()
-        i+=len(x)
+        for id in range(len(x)):
+            assert (x[id][::2]==z[id]).all()
+            i+=1
         mi+=1
     assert i==len(ds)
     assert mi==4