comparison _test_dataset.py @ 19:57f4015e2e09

Iterators extend LookupList
author bergstrj@iro.umontreal.ca
date Thu, 27 Mar 2008 01:59:44 -0400
parents 759d17112b23
children fdf0abc490f7
comparison
equal deleted inserted replaced
18:60b164a0d84a 19:57f4015e2e09
71 71
72 a=ArrayDataSet(data=arr,fields={"x":slice(2),"y":slice(1,4)}) 72 a=ArrayDataSet(data=arr,fields={"x":slice(2),"y":slice(1,4)})
73 73
74 for i, x in enumerate(a.minibatches(["x"], minibatch_size=3, n_batches=6)): 74 for i, x in enumerate(a.minibatches(["x"], minibatch_size=3, n_batches=6)):
75 self.failUnless(numpy.all( x == arr2[i*3:i*3+3,0:2])) 75 self.failUnless(numpy.all( x == arr2[i*3:i*3+3,0:2]))
76 76
77 if __name__ == '__main__': 77 if __name__ == '__main__':
78 unittest.main() 78 unittest.main()
79 79