changeset 312:96cca78de3ed

still something weird in the getitem test
author Thierry Bertin-Mahieux <bertinmt@iro.umontreal.ca>
date Wed, 11 Jun 2008 13:22:00 -0400
parents 0690de82c338
children 009ce84e9f52
files _test_dataset.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/_test_dataset.py	Wed Jun 11 12:45:24 2008 -0400
+++ b/_test_dataset.py	Wed Jun 11 13:22:00 2008 -0400
@@ -267,7 +267,7 @@
             assert (orig[index[i]]['x']==array[index[i]][:3]).all()
             assert (orig[index[i]]['x']==x).all()
             assert orig[index[i]]['y']==array[index[i]][3]
-            assert orig[index[i]]['y']==y
+            assert (orig[index[i]]['y']==y).all()
             assert (orig[index[i]]['z']==array[index[i]][0:3:2]).all()
             assert (orig[index[i]]['z']==z).all()
             i+=1
@@ -289,8 +289,8 @@
     del ds2
 
 #ds[i1:i2:s]# returns a ds with the examples i1,i1+s,...i2-s.
-    ds2=ds[1:7:2]
-    assert isinstance(ds2,LookupList)
+    ds2=ds.subset[1:7:2]
+    assert isinstance(ds2,DataSet)
     test_ds(ds,ds2,[1,3,5])
     del ds2
 
@@ -302,7 +302,7 @@
     del ds2
 
 #ds[[i1,i2,...in]]# returns a ds with examples i1,i2,...in.
-    ds2=ds[[4,7,2,8]]
+    ds2=ds.subset[[4,7,2,8]]
     assert isinstance(ds2,DataSet)
     test_ds(ds,ds2,[4,7,2,8])
     del ds2