Skip to content

Commit c9d4808

Browse files
Merge branch 'do/eisenstat-walker' of github.com:termi-official/NonlinearSolve.jl into do/eisenstat-walker
2 parents 4f06060 + be94d28 commit c9d4808

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
julia-arch: [x86]
1616
os: [ubuntu-latest]
1717
steps:
18-
- uses: actions/checkout@v5
18+
- uses: actions/checkout@v6
1919
- uses: julia-actions/setup-julia@latest
2020
with:
2121
version: ${{ matrix.julia-version }}

.github/workflows/Documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v5
15+
- uses: actions/checkout@v6
1616
- uses: julia-actions/setup-julia@v2
1717
with:
1818
version: "1"

.github/workflows/Downstream.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- {user: SciML, repo: BoundaryValueDiffEq.jl, group: All}
3030
- {user: SciML, repo: DiffEqCallbacks.jl, group: Core}
3131
steps:
32-
- uses: actions/checkout@v5
32+
- uses: actions/checkout@v6
3333
- uses: julia-actions/setup-julia@v2
3434
with:
3535
version: ${{ matrix.julia-version }}
@@ -47,7 +47,7 @@ jobs:
4747
Pkg.instantiate()
4848
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
4949
- name: Clone Downstream
50-
uses: actions/checkout@v5
50+
uses: actions/checkout@v6
5151
with:
5252
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
5353
path: downstream

.github/workflows/SpellCheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout Actions Repository
11-
uses: actions/checkout@v5
11+
uses: actions/checkout@v6
1212
- name: Check spelling
1313
uses: crate-ci/typos@v1.18.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ using NonlinearSolve, StaticArrays
2626
f(u, p) = u .* u .- 2
2727
u0 = @SVector[1.0, 1.0]
2828
prob = NonlinearProblem(f, u0)
29-
solver = solve(prob)
29+
sol = solve(prob)
3030

3131
## Bracketing Methods
3232

lib/NonlinearSolveBase/src/solve.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,8 @@ function solve_call(_prob, args...; merge_callbacks = true, kwargshandle = nothi
151151
throw(NonConcreteEltypeError(RecursiveArrayTools.recursive_unitless_eltype(_prob.u0)))
152152
end
153153

154-
if !(eltype(_prob.u0) <: Number) && !(eltype(_prob.u0) <: Enum) &&
155-
!(_prob.u0 isa AbstractVector{<:AbstractArray} && _prob isa BVProblem)
156-
# Allow Enums for FunctionMaps, make into a trait in the future
157-
# BVPs use Vector of Arrays for initial guesses
158-
throw(NonNumberEltypeError(eltype(_prob.u0)))
154+
if !(eltype(_prob.u0) <: Number) && !(eltype(_prob.u0) <: Enum)
155+
throw(SciMLBase.NonNumberEltypeError(eltype(_prob.u0)))
159156
end
160157
end
161158

test/core_tests.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,3 +444,10 @@ end
444444
sol = solve(prob)
445445
@test SciMLBase.successful_retcode(sol)
446446
end
447+
448+
@testitem "NonNumberEltype error" tags=[:core] begin
449+
u0_broken = [rand(2), rand(2)]
450+
f(u,p) = u
451+
prob = NonlinearProblem(f, u0_broken)
452+
@test_throws SciMLBase.NonNumberEltypeError solve(prob)
453+
end

0 commit comments

Comments
 (0)