Skip to content

Commit 05ebbdc

Browse files
committed
revert first to only
1 parent 51b3be1 commit 05ebbdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/systems/diffeqs/basic_transformations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function change_independent_variable(
158158
function transform(ex::T) where {T}
159159
# 1) Replace the argument of every function; e.g. f(t) -> f(u(t))
160160
for var in vars(ex; op = Nothing) # loop over all variables in expression (op = Nothing prevents interpreting "D(f(t))" as one big variable)
161-
is_function_of_iv1 = iscall(var) && isequal(first(arguments(var)), iv1) # of the form f(t)?
161+
is_function_of_iv1 = iscall(var) && isequal(only(arguments(var)), iv1) # of the form f(t)?
162162
if is_function_of_iv1 && !isequal(var, iv2_of_iv1) # prevent e.g. u(t) -> u(u(t))
163163
var_of_iv1 = var # e.g. f(t)
164164
var_of_iv2_of_iv1 = substitute(var_of_iv1, iv1 => iv2_of_iv1) # e.g. f(u(t))

0 commit comments

Comments
 (0)