Skip to content

Add symengine support #116

@apozas

Description

@apozas

In a project I am using symengine for symbolic manipulation, which is so much faster than sympy. However, max_within_feasible does not admit symengine symbols, because of some incompatibilities between symengine and evalf. In fact, this is the exact error that I am getting, namely

  File "/export/anaconda3/envs/apozas/lib/python3.9/site-packages/inflation/sdp/quantum_tools.py", line 626, in make_numerical
    numeric_values[k] = float(v.evalf(subs=symbols_to_values))
  File "symengine_wrapper.pyx", line 979, in symengine.lib.symengine_wrapper.Basic.n
TypeError: n() got an unexpected keyword argument 'subs'

It would be nice to have support for both, symengine and sympy, so the user does not need to care about which symbolic library they are using.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions