Skip to content

Commit 937e34d

Browse files
authored
Merge pull request #101 from SymbolicML/update-symbolic-utils-syntax
refactor: update symbolic utils deprecated API
2 parents fb02105 + 738a873 commit 937e34d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/DynamicExpressionsSymbolicUtilsExt.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ macro return_on_false(flag, retval)
2121
end
2222

2323
function is_valid(x::SymbolicUtils.Symbolic)
24-
return if SymbolicUtils.istree(x)
24+
return if SymbolicUtils.iscall(x)
2525
all(is_valid.([SymbolicUtils.operation(x); SymbolicUtils.arguments(x)]))
2626
else
2727
true
@@ -140,7 +140,7 @@ function Base.convert(
140140
variable_names::Union{Array{String,1},Nothing}=nothing,
141141
) where {N<:AbstractExpressionNode}
142142
variable_names = deprecate_varmap(variable_names, nothing, :convert)
143-
if !SymbolicUtils.istree(expr)
143+
if !SymbolicUtils.iscall(expr)
144144
variable_names === nothing && return constructorof(N)(String(expr.name))
145145
return constructorof(N)(String(expr.name), variable_names)
146146
end
@@ -234,7 +234,7 @@ function multiply_powers(eqn::Number)::Tuple{SYMBOLIC_UTILS_TYPES,Bool}
234234
end
235235

236236
function multiply_powers(eqn::SymbolicUtils.Symbolic)::Tuple{SYMBOLIC_UTILS_TYPES,Bool}
237-
if !SymbolicUtils.istree(eqn)
237+
if !SymbolicUtils.iscall(eqn)
238238
return eqn, true
239239
end
240240
op = SymbolicUtils.operation(eqn)

0 commit comments

Comments
 (0)