JanJaeken/christoffel

Invalid dictionary tokens 01 and 02 in VOIGT

Closed this issue · 1 comments

The tokens "01" and "02" in the dictionary VOIGT create a Syntax error "Invalid Token" in python 3.7

VOIGT = {00: 0, 11: 1, 22: 2, 12: 3, 21: 3, 02: 4, 20: 4, 01: 5, 10: 5}
^
SyntaxError: invalid token

Is there a way to easily fix this?

I just realized that the user @ezanardi has fixed this issue and made a pull request #1. Thank you.
I still had a problem with the read in of the stiffness matrix and used this code instead:


List = config.get('SCAN', 'stiffness').split()
stiffness_vector = np.zeros((36,1))
stiffness_tensor = np.zeros((6,6))

for i in range(36):
        stiffness_vector[i] = float(List[i])
stiffness_tensor = np.reshape(stiffness_vector, (6, 6))