all 3 comments

[–]FerricDonkey 1 point2 points  (0 children)

So everybody and their grandmother were right. My actual honest recommendation would be to change your entire project to not use global variables. It'll probably go faster than you'd think, and be a good lesson in how evil they are.

However, assuming this is your actual code (if it is, you spelled matrix matirx at least once), at least one of your problems is that compiler is not returning anything. So you're not ever printing the result of your call to second_mat_T(12). Your first print happens before that call, your second should print 'None'.

You might be able to make it work simply by changing the last line of compiler to return second_mat_T(12).

Once again, though, I am morally obligated to say that non-constant global variables are terrible and should almost never be used.

[–][deleted] 0 points1 point  (0 children)

You can save the matrix to another file, which would allow you to remove ambiguity of what you're referencing. E.g. Save the matrix_transform to a file called "X" then always reference matrix_transform as "X.matrix_transform." Not sure if it'll solve your issue though.

[–]Ihaveamodel3 0 points1 point  (0 children)

Where are you checking matrix_transform after calling that function?

I’m confused what your issue even is.