Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Jun 7, 2024
1 parent 18a042a commit 45e7d7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/eigsolve/eigsolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,16 @@ function eigsolve(f, x₀, howmany::Int=1, which::Selector=:LM; kwargs...)
`λ` and `conj(λ)` equally: work in complex arithmetic by providing a complex starting vector `x₀`")
end
end
return eigsolve(f, x₀, howmany, which, alg)
if haskey(kwargs, :alg_rrule)
alg_rrule = kwargs[:alg_rrule]

Check warning on line 210 in src/eigsolve/eigsolve.jl

View check run for this annotation

Codecov / codecov/patch

src/eigsolve/eigsolve.jl#L210

Added line #L210 was not covered by tests
else
alg_rrule = Arnoldi(; tol=alg.tol,
krylovdim=alg.krylovdim,
maxiter=alg.maxiter,
eager=alg.eager,
orth=alg.orth)
end
return eigsolve(f, x₀, howmany, which, alg; alg_rrule=alg_rrule)
end

function eigselector(f,
Expand Down
4 changes: 2 additions & 2 deletions src/linsolve/linsolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ function linsolve(f, b, x₀, a₀::Number=0, a₁::Number=1; kwargs...)
T = promote_type(Core.Compiler.return_type(inner, Tuple{Tb,Tfx}), typeof(a₀),
typeof(a₁))
alg = linselector(f, b, T; kwargs...)
if haskey(kwargs, alg_rrule)
alg_rrule = kwargs[alg_rrule]
if haskey(kwargs, :alg_rrule)
alg_rrule = kwargs[:alg_rrule]

Check warning on line 115 in src/linsolve/linsolve.jl

View check run for this annotation

Codecov / codecov/patch

src/linsolve/linsolve.jl#L115

Added line #L115 was not covered by tests
else
alg_rrule = alg
end
Expand Down

0 comments on commit 45e7d7c

Please sign in to comment.