Python numbers vs. SymPy Numbers in embedded SymPy

20 views
Skip to first unread message

Cambis Farahmandi

unread,
Oct 6, 2018, 9:56:21 PM10/6/18
to sympy
I am working on an ios application with python/sympy embedded.  I have got the basics working but have noticed an issue when I send commands over to the sympy engine.  Normally, when I use sympy I am using it in an interactive shell such as isympy. If you type in a command in isympy it will automatically convert numbers to sympy objects.  For example, if  I want to add two integers 1+2.  In isympy if I check the object type with type(1+2) I will get <class 'sympy.core.numbers.Integer'>; however, with my embedded system I get <class 'int'>, which means the numbers are python objects not sympy.  I know you can use sympify() to convert objects but this does not work for all input.  Isympy has the logic of when to use sympyify() in it.  Is there a way to load isympy in an embedded system or get the object conversion logic in an embedded system?  Thanks in advance for your help. 
Reply all
Reply to author
Forward
0 new messages