Skip to content

Commit

Permalink
Change typeof(x) <: y to x isa y
Browse files Browse the repository at this point in the history
  • Loading branch information
Pepijn de Vos committed Nov 2, 2023
1 parent 55941b5 commit 8cb8b6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/systems/diffeqs/sdesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 346 in src/systems/diffeqs/sdesystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/diffeqs/sdesystem.jl#L346

Added line #L346 was not covered by tests
d = simplify.(-(noiseeqs .* grad) / u)
drift_correction = noiseeqs .* d
else
Expand All @@ -366,7 +366,7 @@ function Girsanov_transform(sys::SDESystem, u; θ0 = 1.0)

noiseqsθ = θ * d

if typeof(noiseeqs) <: Vector
if noiseeqs isa Vector

Check warning on line 369 in src/systems/diffeqs/sdesystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/diffeqs/sdesystem.jl#L369

Added line #L369 was not covered by tests
m = size(noiseeqs)
if m == 1
push!(noiseeqs, noiseqsθ)
Expand Down

0 comments on commit 8cb8b6f

Please sign in to comment.