Codegen Change Suggestion

8 views
Skip to first unread message

Mark Yeatman

unread,
Jan 19, 2018, 1:10:14 PM1/19/18
to PyDy
I really like the functionality in this package! Its great. 

I came across an issue when trying to use the CythonMatrixGenerator function on an expression that doesn't have the 't' symbol. Line 56 in pydy/codegen/matrix_generator.py says:

required_args.remove(me.dynamicsymbols._t)

This throws a KeyError on an expression that doesn't have this symbol. 

I changed my local copy to:

required_args.discard(me.dynamicsymbols._t)

getting rid of the error. 

Jason Moore

unread,
Jan 20, 2018, 5:53:06 PM1/20/18
to py...@googlegroups.com
It is a bit odd that your expressions wouldn't have that symbols. If you create functions of time using sympy.mechanics it should always be there. But I suppose you can custom create some EoMs that don't have sympy functions of time.

Jason

--
You received this message because you are subscribed to the Google Groups "PyDy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydy+unsubscribe@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at https://groups.google.com/group/pydy.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages