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)
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)
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)
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)
def _createTestObjs(self): currArgs = [self.vectors, self.vals] currKwargs = {"origin": self.origin, "atomCoords": self.atomCoords} self.testObjA = tCode.CubeDataSimple(*currArgs, **currKwargs)
def _createTestObjs(self): currArgs = [self.vectors, self.vals] self.testObj = tCode.CubeDataSimple(*currArgs)