From 96328230cc4465d79b56a719a258b9eddedacf1f Mon Sep 17 00:00:00 2001 From: thorek1 Date: Sat, 2 Sep 2023 21:50:53 +0200 Subject: [PATCH] fix compat issue with SymPy 0.1.1 --- Project.toml | 2 +- src/MacroModelling.jl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index b7ae15ce..78373384 100644 --- a/Project.toml +++ b/Project.toml @@ -59,7 +59,7 @@ RuntimeGeneratedFunctions = "^0.5" SpecialFunctions = "^2" SpeedMapping = "^0.3" Subscripts = "^0.1" -SymPyPythonCall = "^0.1" +SymPyPythonCall = "^0.1.1" Symbolics = "^5" julia = "1.8" diff --git a/src/MacroModelling.jl b/src/MacroModelling.jl index 7d00ab2e..afce09af 100644 --- a/src/MacroModelling.jl +++ b/src/MacroModelling.jl @@ -919,6 +919,7 @@ function solve_steady_state!(𝓂::ℳ, symbolic_SS, Symbolics::symbolics; verbo push!(𝓂.solved_vals,Meta.parse(string(soll[1][k]))) #using convert(Expr,x) leads to ugly expressions push!(atoms_in_equations_list, Set(Symbol.(soll[1][k].atoms()))) + # push!(atoms_in_equations_list, Set(Symbol.(soll[vars].atoms()))) # to be fixed push!(SS_solve_func,:($(𝓂.solved_vars[end]) = $(𝓂.solved_vals[end]))) end end @@ -939,7 +940,7 @@ function solve_steady_state!(𝓂::ℳ, symbolic_SS, Symbolics::symbolics; verbo for i in eqs_to_solve # push!(syms_in_eqs, Symbol.(PythonCall.pystr.(i.atoms()))...) - push!(syms_in_eqs, Symbol.(SPyPyC.free_symbols(i))...) + push!(syms_in_eqs, Symbol.(SPyPyC.unSym.(SPyPyC.free_symbols(i)))...) end # println(syms_in_eqs)