Skip to content

Commit b1f3ca7

Browse files
committed
fix to make docs pass
this may not be the correct thing to do, but parameters inside a DataDrivenProblem do not seem to be really used at the moment
1 parent be33b31 commit b1f3ca7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/problem/type.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ function DataDrivenProblem(X::AbstractMatrix;
152152
DX::AbstractMatrix = Array{eltype(X)}(undef, 0, 0),
153153
Y::AbstractMatrix = Array{eltype(X)}(undef, 0, 0),
154154
U::F = Array{eltype(X)}(undef, 0, 0),
155-
p::AbstractVector = Array{eltype(X)}(undef, 0),
155+
p::Union{AbstractVector, MTKParameters} = Array{eltype(X)}(undef, 0),
156156
probtype = nothing,
157157
kwargs...) where {F <: Union{AbstractMatrix, Function}}
158-
return DataDrivenProblem(probtype, X, t, DX, Y, U, p; kwargs...)
158+
_p = isa(p, MTKParameters) ? p.tunable : p
159+
return DataDrivenProblem(probtype, X, t, DX, Y, U, _p; kwargs...)
159160
end
160161

161162
function Base.summary(io::IO, x::DataDrivenProblem{N, C, P}) where {N, C, P}

0 commit comments

Comments
 (0)