Closed PerformanceCoder closed 2 years ago
I think typeof(BasicType(expr))
should work.
Yes, it works:
using SymEngine
x, y = symbols("x, y")
expr = x + y + x*y + x^2 + x ^ 3 + x ^4 + y ^ 4
typeof(SymEngine.BasicType(expr))
# SymEngine.BasicType{Val{:Add}}
Thank you very much!
Good morning!
Is there any way in SymEngine.jl to access the type of operation when going through the expression tree? For example, when using Python wrapper I can write something like this:
What can replace
type
function in Julia? Currently,typeof
returnsBasic
for every expression, so it can't be used.With best regards!