Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 0d73574

Browse files
Merge pull request #93 from pepijndevos/new-branch
Change typeof(x) <: y to x isa y
2 parents 89a4b85 + b54abfb commit 0d73574

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/halley.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function SciMLBase.__solve(prob::NonlinearProblem,
5656
real(oneunit(eltype(T))) * (eps(real(one(eltype(T)))))^(4 // 5)
5757
rtol = reltol !== nothing ? reltol : eps(real(one(eltype(T))))^(4 // 5)
5858

59-
if typeof(x) <: Number
59+
if x isa Number
6060
xo = oftype(one(eltype(x)), Inf)
6161
else
6262
xo = map(x -> oftype(one(eltype(x)), Inf), x)

src/raphson.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function SciMLBase.__solve(prob::NonlinearProblem,
7878
real(oneunit(eltype(T))) * (eps(real(one(eltype(T)))))^(4 // 5)
7979
rtol = reltol !== nothing ? reltol : eps(real(one(eltype(T))))^(4 // 5)
8080

81-
if typeof(x) <: Number
81+
if x isa Number
8282
xo = oftype(one(eltype(x)), Inf)
8383
else
8484
xo = map(x -> oftype(one(eltype(x)), Inf), x)

0 commit comments

Comments
 (0)