def test_as_vector_counting_from_zero( self ): matrix = np.array( [ [ 1, 0 ], [ 0, 1 ] ] ) so = SymmetryOperation( matrix ) self.assertEqual( so.as_vector( count_from_zero=True ), [ 0, 1 ] )
def test_as_vector_counting_from_zero(self): matrix = np.array([[1, 0], [0, 1]]) so = SymmetryOperation(matrix) self.assertEqual(so.as_vector(count_from_zero=True), [0, 1])
def test_as_vector( self ): matrix = np.array( [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ] ) so = SymmetryOperation( matrix ) self.assertEqual( so.as_vector(), [ 2, 3, 1 ] )
def test_as_vector(self): matrix = np.array([[0, 0, 1], [1, 0, 0], [0, 1, 0]]) so = SymmetryOperation(matrix) self.assertEqual(so.as_vector(), [2, 3, 1])