Exemplo n.º 1
0
    def testThreeDimToTwoDimA(self):
        expOutArray = [[3, 4], [9, 1]]
        vectors = [self.vectA, self.vectB]
        expOutObj = tCode.CubeDataSimple(vectors, expOutArray)
        actOutObj = self._runTestFunct()

        self.assertEqual(expOutObj, actOutObj)
Exemplo n.º 2
0
    def testThreeDimToOneDim(self):
        self.keepDims = [2]
        self.useIdxOtherDims = [0, 1]

        expOutArray = [6, 3, 4]
        vectors = [self.vectC]
        expOutObj = tCode.CubeDataSimple(vectors, expOutArray)
        actOutObj = self._runTestFunct()

        self.assertEqual(expOutObj, actOutObj)
Exemplo n.º 3
0
    def testThreeDimToTwoDimB(self):
        self.keepDims = [0, 2]
        self.useIdxOtherDims = [0]

        expOutArray = [[1, 2, 3], [5, 7, 9]]
        vectors = [self.vectA, self.vectC]
        expOutObj = tCode.CubeDataSimple(vectors, expOutArray)
        actOutObj = self._runTestFunct()

        self.assertEqual(expOutObj, actOutObj)
Exemplo n.º 4
0
    def _loadExpectedObjA(self):
        vectors = [
            self.cubeDict["step_x"], self.cubeDict["step_y"],
            self.cubeDict["step_z"]
        ]
        values = self.cubeDict["data_grid"]
        origin = self.cubeDict["origin"]
        atomCoords = [[5, 2, 1, 10]]

        args = [vectors, values]
        kwargs = {"origin": origin, "atomCoords": atomCoords}

        return tCode.CubeDataSimple(*args, **kwargs)
Exemplo n.º 5
0
 def _createTestObjs(self):
     currArgs = [self.vectors, self.vals]
     currKwargs = {"origin": self.origin, "atomCoords": self.atomCoords}
     self.testObjA = tCode.CubeDataSimple(*currArgs, **currKwargs)
Exemplo n.º 6
0
 def _createTestObjs(self):
     currArgs = [self.vectors, self.vals]
     self.testObj = tCode.CubeDataSimple(*currArgs)