File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ function change_independent_variable(
158
158
function transform (ex:: T ) where {T}
159
159
# 1) Replace the argument of every function; e.g. f(t) -> f(u(t))
160
160
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)?
162
162
if is_function_of_iv1 && ! isequal (var, iv2_of_iv1) # prevent e.g. u(t) -> u(u(t))
163
163
var_of_iv1 = var # e.g. f(t)
164
164
var_of_iv2_of_iv1 = substitute (var_of_iv1, iv1 => iv2_of_iv1) # e.g. f(u(t))
You can’t perform that action at this time.
0 commit comments