示例#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")
示例#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")
示例#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")
示例#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")
示例#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")
示例#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")