Skip to content

Commit 3c570f1

Browse files
Update src/problem/type.jl
Co-authored-by: Lorenzo Contento <16554887+lcontento@users.noreply.github.com>
1 parent 233a338 commit 3c570f1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/problem/type.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ function DataDrivenProblem(X::AbstractMatrix;
155155
p::Union{AbstractVector, MTKParameters} = Array{eltype(X)}(undef, 0),
156156
probtype = nothing,
157157
kwargs...) where {F <: Union{AbstractMatrix, Function}}
158-
_p, _, _ = SS.isscimlstructure(p) ? SS.canonicalize(SS.Tunable(), p) : p
158+
if SS.isscimlstructure(p)
159+
_p, _, _ = SS.canonicalize(SS.Tunable(), p)
160+
else
161+
_p = p
162+
end
159163
return DataDrivenProblem(probtype, X, t, DX, Y, U, _p; kwargs...)
160164
end
161165

0 commit comments

Comments
 (0)