예제 #1
0
파일: test_barray.py 프로젝트: imclab/blaze
 def test03(self):
     """Testing `__getitem()__` method with ranges and steps"""
     a = np.arange(1e3)
     b = chunk(a, atom=a.dtype, bparams=blz.bparams())
     #print "b[1:8:3]->", `b[1:8:3]`
     assert_array_equal(a[1:8:3], b[1:8:3], "Arrays are not equal")
예제 #2
0
파일: test_barray.py 프로젝트: imclab/blaze
 def test04(self):
     """Testing `__getitem()__` method with long ranges"""
     a = np.arange(1e4)
     b = chunk(a, atom=a.dtype, bparams=blz.bparams())
     #print "b[1:8000]->", `b[1:8000]`
     assert_array_equal(a[1:8000], b[1:8000], "Arrays are not equal")
예제 #3
0
파일: test_barray.py 프로젝트: imclab/blaze
 def test01(self):
     """Testing `__getitem()__` method with scalars"""
     a = np.arange(1e3)
     b = chunk(a, atom=a.dtype, bparams=blz.bparams())
     #print "b[1]->", `b[1]`
     self.assert_(a[1] == b[1], "Values in key 1 are not equal")