Пример #1
0
 def test_indexCube_3D(self):
     nN = np.array([3, 3, 3])
     self.assertTrue(
         np.all(
             indexCube('A', nN) == np.array([0, 1, 3, 4, 9, 10, 12, 13])))
     self.assertTrue(
         np.all(
             indexCube('B', nN) == np.array([3, 4, 6, 7, 12, 13, 15, 16])))
     self.assertTrue(
         np.all(
             indexCube('C', nN) == np.array([4, 5, 7, 8, 13, 14, 16, 17])))
     self.assertTrue(
         np.all(
             indexCube('D', nN) == np.array([1, 2, 4, 5, 10, 11, 13, 14])))
     self.assertTrue(
         np.all(
             indexCube('E', nN) == np.array([9, 10, 12, 13, 18, 19, 21, 22
                                             ])))
     self.assertTrue(
         np.all(
             indexCube('F', nN) == np.array(
                 [12, 13, 15, 16, 21, 22, 24, 25])))
     self.assertTrue(
         np.all(
             indexCube('G', nN) == np.array(
                 [13, 14, 16, 17, 22, 23, 25, 26])))
     self.assertTrue(
         np.all(
             indexCube('H', nN) == np.array(
                 [10, 11, 13, 14, 19, 20, 22, 23])))
Пример #2
0
 def test_indexCube_3D(self):
     nN = np.array([3, 3, 3])
     self.assertTrue(np.all(
         indexCube('A', nN) == np.array([0, 1, 3, 4, 9, 10, 12, 13])
     ))
     self.assertTrue(np.all(
         indexCube('B', nN) == np.array([3, 4, 6, 7, 12, 13, 15, 16])
     ))
     self.assertTrue(np.all(
         indexCube('C', nN) == np.array([4, 5, 7, 8, 13, 14, 16, 17])
     ))
     self.assertTrue(np.all(
         indexCube('D', nN) == np.array([1, 2, 4, 5, 10, 11, 13, 14])
     ))
     self.assertTrue(np.all(
         indexCube('E', nN) == np.array([9, 10, 12, 13, 18, 19, 21, 22])
     ))
     self.assertTrue(np.all(
         indexCube('F', nN) == np.array([12, 13, 15, 16, 21, 22, 24, 25])
     ))
     self.assertTrue(np.all(
         indexCube('G', nN) == np.array([13, 14, 16, 17, 22, 23, 25, 26])
     ))
     self.assertTrue(np.all(
         indexCube('H', nN) == np.array([10, 11, 13, 14, 19, 20, 22, 23])
     ))
Пример #3
0
 def test_indexCube_2D(self):
     nN = np.array([3, 3])
     self.assertTrue(np.all(indexCube('A', nN) == np.array([0, 1, 3, 4])))
     self.assertTrue(np.all(indexCube('B', nN) == np.array([3, 4, 6, 7])))
     self.assertTrue(np.all(indexCube('C', nN) == np.array([4, 5, 7, 8])))
     self.assertTrue(np.all(indexCube('D', nN) == np.array([1, 2, 4, 5])))
Пример #4
0
 def test_indexCube_2D(self):
     nN = np.array([3, 3])
     self.assertTrue(np.all(indexCube('A', nN) == np.array([0, 1, 3, 4])))
     self.assertTrue(np.all(indexCube('B', nN) == np.array([3, 4, 6, 7])))
     self.assertTrue(np.all(indexCube('C', nN) == np.array([4, 5, 7, 8])))
     self.assertTrue(np.all(indexCube('D', nN) == np.array([1, 2, 4, 5])))