Skip to content

Commit 400dbb4

Browse files
committed
fix: remove bad broadcast
1 parent 7f37ea3 commit 400dbb4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/systems/diffeqs/sdesystem.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,10 +739,12 @@ function SDEFunctionExpr{iip}(sys::SDESystem, dvs = unknowns(sys),
739739
end
740740

741741
M = calculate_massmatrix(sys)
742+
_M = (u0 === nothing || M == I) ? M : ArrayInterface.restructure(u0 .* u0', M)
743+
742744
if sparse
743745
uElType = u0 === nothing ? Float64 : eltype(u0)
744746
jac_prototype = similar(calculate_jacobian(sys; sparse), uElType)
745-
W_prototype = similar(jac_prototype .+ M, uElType)
747+
W_prototype = similar(jac_prototype + M, uElType)
746748
else
747749
jac_prototype = nothing
748750
W_prototype = nothing
@@ -758,7 +760,6 @@ function SDEFunctionExpr{iip}(sys::SDESystem, dvs = unknowns(sys),
758760
_Wfact, _Wfact_t = :nothing, :nothing
759761
end
760762

761-
_M = (u0 === nothing || M == I) ? M : ArrayInterface.restructure(u0 .* u0', M)
762763

763764
ex = quote
764765
f = $f

0 commit comments

Comments
 (0)