symengine.py icon indicating copy to clipboard operation
symengine.py copied to clipboard

'FunctionSymbol' object has no attribute 'name'

Open thiagotps opened this issue 4 years ago • 1 comments

The following code results in a error:

from symengine import symbols, Function

x = symbols('x')
f = Function('f')
print(f(x).name)

image

Replacing symengine with sympy gives the desired result: image

Some useful information: image

Is there another way of retrieving the function name from a expression such f(x) ? Thanks in advance.

thiagotps avatar Apr 20 '20 03:04 thiagotps

There's the get_name function. See https://github.com/symengine/symengine.py/blob/master/symengine/lib/symengine_wrapper.pyx#L2626 PRs welcome to add a name property.

isuruf avatar Apr 20 '20 04:04 isuruf