diff --git a/src/advancedHMC_MCMC.jl b/src/advancedHMC_MCMC.jl index 2276b47074..df174e2538 100644 --- a/src/advancedHMC_MCMC.jl +++ b/src/advancedHMC_MCMC.jl @@ -489,7 +489,7 @@ function ahmc_bayesian_pinn_ode(prob::DiffEqBase.ODEProblem, chain; strategy = strategy == GridTraining ? strategy(physdt) : strategy if dataset != [nothing] && - (length(dataset) < 2 || !(typeof(dataset) <: Vector{<:Vector{<:AbstractFloat}})) + (length(dataset) < 2 || !(dataset isa Vector{<:Vector{<:AbstractFloat}})) throw(error("Invalid dataset. dataset would be timeseries (x̂,t) where type: Vector{Vector{AbstractFloat}")) end diff --git a/src/pinn_types.jl b/src/pinn_types.jl index 8a4766d122..428f03fc36 100644 --- a/src/pinn_types.jl +++ b/src/pinn_types.jl @@ -106,7 +106,7 @@ struct PhysicsInformedNN{T, P, PH, DER, PE, AL, ADA, LOG, K} <: AbstractPINN log_options = LogOptions(), iteration = nothing, kwargs...) - multioutput = typeof(chain) <: AbstractArray + multioutput = chain isa AbstractArray if phi === nothing if multioutput