From 8cb8b6f8febb762cc2c59bf26f3a6b789d76348d Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Thu, 2 Nov 2023 18:17:16 +0100 Subject: [PATCH] Change typeof(x) <: y to x isa y --- src/systems/diffeqs/sdesystem.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/systems/diffeqs/sdesystem.jl b/src/systems/diffeqs/sdesystem.jl index a42c7aecfa..e584857fd8 100644 --- a/src/systems/diffeqs/sdesystem.jl +++ b/src/systems/diffeqs/sdesystem.jl @@ -343,7 +343,7 @@ function Girsanov_transform(sys::SDESystem, u; θ0 = 1.0) grad = Symbolics.gradient(u, states(sys)) noiseeqs = get_noiseeqs(sys) - if typeof(noiseeqs) <: Vector + if noiseeqs isa Vector d = simplify.(-(noiseeqs .* grad) / u) drift_correction = noiseeqs .* d else @@ -366,7 +366,7 @@ function Girsanov_transform(sys::SDESystem, u; θ0 = 1.0) noiseqsθ = θ * d - if typeof(noiseeqs) <: Vector + if noiseeqs isa Vector m = size(noiseeqs) if m == 1 push!(noiseeqs, noiseqsθ)