Skip to content

Commit 2ba0b74

Browse files
committed
Add IterativeEigensolvers
1 parent 6922b6f commit 2ba0b74

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ Currently, the `@compat` macro supports the following syntaxes:
101101
* `using Compat.Printf` is provided on versions older than 0.7, where this library is not
102102
yet a part of the standard library. ([#25056])
103103

104+
* `using Compat.IterativeEigensolvers` is provided on versions older than 0.7, where this
105+
library is not yet a part of the standard library. ([#24714])
106+
104107
## New functions, macros, and methods
105108

106109
* `@views` takes an expression and converts all slices to views ([#20164]), while
@@ -396,6 +399,7 @@ includes this fix. Find the minimum version from there.
396399
[#24647]: https://github.com/JuliaLang/julia/issues/24647
397400
[#24652]: https://github.com/JuliaLang/julia/issues/24652
398401
[#24657]: https://github.com/JuliaLang/julia/issues/24657
402+
[#24714]: https://github.com/JuliaLang/julia/issues/24714
399403
[#24785]: https://github.com/JuliaLang/julia/issues/24785
400404
[#25012]: https://github.com/JuliaLang/julia/issues/25012
401405
[#25021]: https://github.com/JuliaLang/julia/issues/25021

src/Compat.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,18 @@ else
769769
import Printf
770770
end
771771

772+
if VERSION < v"0.7.0-DEV.2655"
773+
@eval module IterativeEigensolvers
774+
using Base: eigs, svds
775+
export eigs, svds
776+
end
777+
elseif VERSION < v"0.7.0-DEV.3019"
778+
import IterativeEigenSolvers
779+
const IterativeEigensolvers = IterativeEigenSolvers
780+
else
781+
import IterativeEigensolvers
782+
end
783+
772784
# 0.7.0-DEV.1993
773785
@static if !isdefined(Base, :EqualTo)
774786
if VERSION >= v"0.6.0"

test/runtests.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,16 @@ module Test25056
912912
@test isdefined(@__MODULE__, Symbol("@sprintf"))
913913
end
914914

915+
# 0.7
916+
module Test24714
917+
using Compat
918+
using Compat.Test
919+
using Compat.IterativeEigensolvers
920+
@test isdefined(@__MODULE__, :IterativeEigensolvers)
921+
@test isdefined(@__MODULE__, :eigs)
922+
@test isdefined(@__MODULE__, :svds)
923+
end
924+
915925
let a = [0,1,2,3,0,1,2,3]
916926
@test findfirst(equalto(3), [1,2,4,1,2,3,4]) == 6
917927
@test findfirst(!equalto(1), [1,2,4,1,2,3,4]) == 2

0 commit comments

Comments
 (0)