changeset 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 d7d67651d67c
children 2a12e7437c56
files test_dataset.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
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