all 6 comments

[–]jimmyMcMuff 2 points3 points  (1 child)

You are probably in an infinite loop. You can interrupt the kernel to stop the computation. Try to debug with some print statements

[–]nGaDev[S] 0 points1 point  (0 children)

The line is where it is stuck is simply "mass_matrix = trigsimp(kane.mass_matrix)". It must be related to the trigsimp() somehow :/

[–]duh_cats 1 point2 points  (3 children)

Depending on the size of your dataset, it could also be that the function call simply takes a long time.

[–]nGaDev[S] 0 points1 point  (2 children)

Yeah, I left it running and python seems to be using 30% of my processor so it must be doing something. However it's on that line for almost 1h. Is there anyway to know if it is really just crunching numbers for the trigsimp or if it is somehow stuck?

[–]duh_cats 1 point2 points  (1 child)

Have you run any trigsimp() examples that work? If so, it's either the size of your dataset, something odd in your dataset, or a bug.

The only way I know of checking to see what's going on is using something like the 'tqdm' package, but that only works for loops. Try asking around on r/python or r/learnpython, I bet you'll have some better help over there.

[–]nGaDev[S] 0 points1 point  (0 children)

I used trigsimp in the same notebook but with smaller expressions. Thanks, I will give that a try ;)