Пример #1
0
 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
 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
 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")