comparison test_dataset.py @ 158:90104343c665

typo
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Mon, 12 May 2008 16:24:59 -0400
parents e8c8022582f4
children 60e00cce3492
comparison
equal deleted inserted replaced
157:e8c8022582f4 158:90104343c665
381 example2 = LookupList(['v','w'], ['a','b']) 381 example2 = LookupList(['v','w'], ['a','b'])
382 example3 = LookupList(['x','y','z','u','v','w'], [[1, 2, 3],2,3,0,'a','b']) 382 example3 = LookupList(['x','y','z','u','v','w'], [[1, 2, 3],2,3,0,'a','b'])
383 assert example+example2==example3 383 assert example+example2==example3
384 assert have_raised("var['x']+var['x']",x=example) 384 assert have_raised("var['x']+var['x']",x=example)
385 385
386 def test_CacheDataSet(): 386 def test_CachedDataSet():
387 print "test_CacheDataSet" 387 print "test_CacheDataSet"
388 a2 = numpy.random.rand(10,4) 388 a2 = numpy.random.rand(10,4)
389 ds1 = ArrayDataSet(a2,LookupList(['x','y','z'],[slice(3),3,[0,2]]))###???tuple not tested 389 ds1 = ArrayDataSet(a2,LookupList(['x','y','z'],[slice(3),3,[0,2]]))###???tuple not tested
390 ds2 = CachedDataSet(ds1) 390 ds2 = CachedDataSet(ds1)
391 ds3 = CachedDataSet(ds1,cache_all_upon_construction=True) 391 ds3 = CachedDataSet(ds1,cache_all_upon_construction=True)
438 raise NotImplementedError() 438 raise NotImplementedError()
439 if __name__=='__main__': 439 if __name__=='__main__':
440 test1() 440 test1()
441 test_LookupList() 441 test_LookupList()
442 test_ArrayDataSet() 442 test_ArrayDataSet()
443 test_CacheDataSet() 443 test_CachedDataSet()
444 #test pmat.py 444 #test pmat.py