Ejemplo n.º 1
0
 def test04(self):
     """Testing `__getitem()__` method with long ranges"""
     a = np.arange(1e4)
     b = chunk(a, atom=a.dtype, cparams=ca.cparams())
     #print "b[1:8000]->", `b[1:8000]`
     assert_array_equal(a[1:8000], b[1:8000], "Arrays are not equal")
Ejemplo n.º 2
0
 def test03(self):
     """Testing `__getitem()__` method with ranges and steps"""
     a = np.arange(1e3)
     b = chunk(a, atom=a.dtype, cparams=ca.cparams())
     #print "b[1:8:3]->", `b[1:8:3]`
     assert_array_equal(a[1:8:3], b[1:8:3], "Arrays are not equal")
Ejemplo n.º 3
0
 def test01(self):
     """Testing `__getitem()__` method with scalars"""
     a = np.arange(1e3)
     b = chunk(a, atom=a.dtype, cparams=ca.cparams())
     #print "b[1]->", `b[1]`
     self.assert_(a[1] == b[1], "Values in key 1 are not equal")
Ejemplo n.º 4
0
 def test04(self):
     """Testing `__getitem()__` method with long ranges"""
     a = np.arange(1e4)
     b = chunk(a, atom=a.dtype, cparams=ca.cparams())
     #print "b[1:8000]->", `b[1:8000]`
     assert_array_equal(a[1:8000], b[1:8000], "Arrays are not equal")
Ejemplo n.º 5
0
 def test03(self):
     """Testing `__getitem()__` method with ranges and steps"""
     a = np.arange(1e3)
     b = chunk(a, atom=a.dtype, cparams=ca.cparams())
     #print "b[1:8:3]->", `b[1:8:3]`
     assert_array_equal(a[1:8:3], b[1:8:3], "Arrays are not equal")
Ejemplo n.º 6
0
 def test01(self):
     """Testing `__getitem()__` method with scalars"""
     a = np.arange(1e3)
     b = chunk(a, atom=a.dtype, cparams=ca.cparams())
     #print "b[1]->", `b[1]`
     self.assert_(a[1] == b[1], "Values in key 1 are not equal")