Skip to content

Commit 0253c85

Browse files
Merge pull request #512 from SciML/sutils
Bump symbolicutils to 2
2 parents 3ece13d + b9a8757 commit 0253c85

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Reexport = "1.0"
3838
Setfield = "1"
3939
Statistics = "1"
4040
StatsBase = "0.32.0, 0.33, 0.34"
41-
SymbolicUtils = "1"
42-
Symbolics = "5"
41+
SymbolicUtils = "2"
42+
Symbolics = "5.30.1"
4343
julia = "1.10"
4444

4545
[extras]

lib/DataDrivenSR/src/DataDrivenSR.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function collect_numerical_parameters(eq, options = DataDrivenCommonOptions())
108108
end
109109

110110
function _collect_numerical_parameters!(ps::AbstractVector, eq, options)
111-
if Symbolics.istree(eq)
111+
if Symbolics.iscall(eq)
112112
args_ = map(Symbolics.arguments(eq)) do (eqi)
113113
_collect_numerical_parameters!(ps, eqi, options)
114114
end

src/DataDrivenDiffEq.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ using Setfield
1414

1515
@reexport using ModelingToolkit
1616
using ModelingToolkit: AbstractSystem
17-
using SymbolicUtils: operation, arguments, istree, issym
17+
using SymbolicUtils: operation, arguments, iscall, issym
1818
using Symbolics
1919
using Symbolics: scalarize, variable, value
2020
@reexport using ModelingToolkit: unknowns, parameters, independent_variable, observed,

src/basis/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function count_operation(x::AbstractArray, ops::AbstractArray, nested::Bool = tr
3939
end
4040

4141
function split_term!(x::AbstractArray, o, ops::AbstractArray = [+])
42-
if istree(o)
42+
if iscall(o)
4343
n_ops = count_operation(o, ops, false)
4444
c_ops = 0
4545
@views begin
@@ -69,7 +69,7 @@ remove_constant_factor(x::Number) = one(x)
6969

7070
function remove_constant_factor(x)
7171
# Return, if the function is nested
72-
istree(x) || return x
72+
iscall(x) || return x
7373
# Count the number of operations
7474
n_ops = count_operation(x, [*], false) + 1
7575
# Create a new array

0 commit comments

Comments
 (0)