Skip to content

Commit 79307cb

Browse files
Inline rhs extraction instead of internal Symbolics.rhss
`Symbolics.rhss` is an undocumented one-line internal helper (`rhss(xs) = map(x->x.rhs, xs)`, not exported). Replace the single use in deim.jl with the equivalent comprehension and drop its ExplicitImports non-public allow-list entry, so we don't depend on a Symbolics internal. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ab48809 commit 79307cb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/deim.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function deim(
146146
ModelingToolkit.get_var_to_name(sys)[Symbolics.getname(ŷ)] = Symbolics.unwrap(ŷ)
147147

148148
deqs, eqs = get_deqs(sys) # split eqs into differential and non-differential equations
149-
rhs = Symbolics.rhss(deqs)
149+
rhs = [eq.rhs for eq in deqs]
150150
# a sparse matrix of coefficients for the linear part,
151151
# a vector of constant terms and a vector of nonlinear terms about dvs
152152
A, g, F = separate_terms(rhs, dvs, iv)

test/qa/qa.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ run_qa(
3030
:get_eqs, :get_initial_conditions, :get_iv, :get_observed,
3131
:get_unknowns, :get_var_to_name, :topsort_equations,
3232
# not public in Symbolics
33-
:getname, :scalarize, :unwrap, :rhss, :value,
33+
:getname, :scalarize, :unwrap, :value,
3434
# not public in SymbolicUtils
3535
:isadd, :ismul,
3636
),

0 commit comments

Comments
 (0)