You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but this is not possible with SymEngine::expand(), or I am missing something quite obvious.
I modified ExpandVisitor by adding this method to make it work for now:
void bvisit(const FunctionSymbol &x) {
vec_basic args;
for (auto &arg: x.get_args()) {
args.push_back(expand(arg));
}
auto e = function_symbol(x.get_name(), args);
Add::dict_add_term(d_, multiply, e);
}
I am using a patched version of SymEngine 0.10.1 on Arch.
Could you please advise me on how to handle FunctionSymbols properly?
Best,
Saleh
The text was updated successfully, but these errors were encountered:
salehjg
changed the title
ExpandVisitor does not process FunctionSymbol's argumentsExpandVisitor does not process arguments of FunctionSymbolSep 24, 2023
Hi there,
I was experimenting with
expand(foo, true)
and noticed thatExpandVisitor
is not expanding the arguments of symbolic functions (FunctionSymbol
).For example with Sympy:
but this is not possible with
SymEngine::expand()
, or I am missing something quite obvious.I modified
ExpandVisitor
by adding this method to make it work for now:I am using a patched version of SymEngine 0.10.1 on Arch.
Could you please advise me on how to handle
FunctionSymbol
s properly?Best,
Saleh
The text was updated successfully, but these errors were encountered: