Skip to content

Commit ba14aed

Browse files
committed
use substitute function from SymbolicUtils
1 parent afab565 commit ba14aed

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ NaNMath = "0.3"
3737
SafeTestsets = "0.0.1"
3838
SpecialFunctions = "0.7, 0.8, 0.9, 0.10"
3939
StaticArrays = "0.10, 0.11, 0.12"
40-
SymbolicUtils = "0.1.1, 0.2"
40+
SymbolicUtils = "0.2.1, 0.2"
4141
TreeViews = "0.3"
4242
UnPack = "0.1"
4343
Unitful = "1.1"

src/utils.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ function _substitute(expr, ks, vs)
116116
end
117117

118118
function _substitute(expr, dict::Dict)
119-
sub = SymbolicUtils.RuleSet([SymbolicUtils.@rule(~x::(x->haskey(dict, x)) => dict[~x])])
120-
to_mtk(simplify(sub(expr)))
119+
to_mtk(simplify(SymbolicUtils.substitute(expr, dict)))
121120
end
122121

123122
@deprecate substitute_expr!(expr,s) substitute(expr,s)

0 commit comments

Comments
 (0)