symengine.py
symengine.py copied to clipboard
Python wrappers for SymEngine
Cythonization error: ``` [ 50%] Cythonizing /tmp/pip-install-qgianthy/symengine_7919c2d002ce4afe9fea82e7bdc6d9ec/build/lib.linux-x86_64-cpython-311/symengine/lib/symengine_wrapper.pyx performance hint: symengine_wrapper.pyx:5072:5: Exception check on '_ctypes_callback_lambda_real' will always require the GIL to be acquired. Possible solutions: 1. Declare '_ctypes_callback_lambda_real' as 'noexcept' if...
The following Code leads to a segmentation fault: ``` import symengine symengine.Basic() ```
I recently noticed a numerical difference when using the `symengine` wheel package from PyPI and the one provided by Arch Linux. This leads to [a `qiskit` unit test to fail](https://github.com/Qiskit/qiskit/issues/12359#issuecomment-2104426621)....
## Edited description (Jan 19, 2025) Test `test_lambdify__sympy()` from [test_lambdify.py](https://github.com/symengine/symengine.py/blob/master/symengine/tests/test_lambdify.py) fails when sympy is installed and symengine was compiled with `WITH_TCMALLOC=ON`. Minimal example: ```python import symengine as se import sympy...
I would like to request the addition of support for Boolean logic with variables in SymEngine. While SymEngine already supports Boolean constants (True and False), it currently lacks support for...
Hello! When trying to check the equality for two expressions I want to utilize a method similar to the `.equals()` method in `sympy` (see example below) ```python import sympy as...
This may sound a bit baseless since I am very new to symengine and have recently been trying to convert my sympy based code to symengine for speed reasons. Currently,...
Hey! Using `symengine`, I was trying to check whether a given expression is polynomial. In the [C++ documentation](https://symengine.org/symengine/namespaceSymEngine.html#a5edc21801e92c0d5b42c66123a6ed621) there exists a method `is_polynomial()` which would be exactly what I was...
Hello, I was just wondering if there was a way to dynamically get the source code for a lambdify'd function in symengine? This is one of the last use cases...
Here's a self-contained test ```python from symengine import Symbol, DenseMatrix class MySymbol(Symbol): def __getitem__(self, x): pass x = Symbol("x") y = MySymbol("y") DenseMatrix([x]) # works fine DenseMatrix([y]) # SIGSEGV ```...