Mercurial > pylearn
comparison _test_dataset.py @ 525:82da179d95b2
added one test.
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Fri, 14 Nov 2008 16:48:17 -0500 |
parents | 18702ceb2096 |
children |
comparison
equal
deleted
inserted
replaced
524:317a052f9b14 | 525:82da179d95b2 |
---|---|
313 del ds2 | 313 del ds2 |
314 | 314 |
315 #ds[i] returns the (i+1)-th example of the dataset. | 315 #ds[i] returns the (i+1)-th example of the dataset. |
316 ds2=ds[5] | 316 ds2=ds[5] |
317 assert isinstance(ds2,Example) | 317 assert isinstance(ds2,Example) |
318 test_ds(ds,ds2,[5]) | |
318 assert have_raised("var['ds']["+str(len(ds))+"]",ds=ds) # index not defined | 319 assert have_raised("var['ds']["+str(len(ds))+"]",ds=ds) # index not defined |
319 assert not have_raised("var['ds']["+str(len(ds)-1)+"]",ds=ds) | 320 assert not have_raised("var['ds']["+str(len(ds)-1)+"]",ds=ds) |
320 del ds2 | 321 del ds2 |
321 | 322 |
322 #ds[[i1,i2,...in]]# returns a ds with examples i1,i2,...in. | 323 #ds[[i1,i2,...in]]# returns a ds with examples i1,i2,...in. |