Skip to content
This repository was archived by the owner on Apr 26, 2021. It is now read-only.

Commit 2fb6d06

Browse files
authored
Merge pull request #5 from andreasnoack/master
Update syntax and test setup
2 parents 761160a + b39da14 commit 2fb6d06

File tree

6 files changed

+17
-15
lines changed

6 files changed

+17
-15
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ os:
44
- linux
55
- osx
66
julia:
7-
- 0.4
87
- 0.5
9-
# - nightly
8+
- 0.6
9+
- nightly
1010
notifications:
1111
email: false
1212
# uncomment the following lines to override the default test script

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ environment:
22
matrix:
33
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
44
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
5+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
6+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
57
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
68
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
79

src/GenericSVD.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function svd!{T<:Real}(B::Bidiagonal{T}, U=nothing, Vt=nothing, ɛ=eps(T))
100100
n = size(B, 1)
101101
n₂ = n
102102

103-
maxB = max(maxabs(B.dv),maxabs(B.ev))
103+
maxB = max(maximum(abs, B.dv), maximum(abs, B.ev))
104104

105105
if istriu(B)
106106
while true

src/bidiagonalize.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ end
4646
function bidiagonalize_tall!{T}(A::Matrix{T})
4747
m,n = size(A)
4848
R = real(T)
49-
B = Bidiagonal{R}(Array(R,n),Array(R,n-1),true)
50-
bidiagonalize_tall!(A,B)
49+
B = Bidiagonal{R}(Vector{R}(n), Vector{R}(n - 1), true)
50+
bidiagonalize_tall!(A, B)
5151
end
5252

5353
function Base.full{T}(P::PackedUVt{T};thin=true)

test/bigfloat.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ srand(1)
66
n,m = 100,20
77

88
X = randn(n,m)
9-
bX = big(X)
9+
bX = big.(X)
1010
bS = svdfact(bX)
1111
@test isapprox(full(bS), bX, rtol=1e3*eps(BigFloat))
1212
@test isapprox(svdvals(bX), svdvals(X), rtol=1e3*eps())
1313
@test bX == X # check we didn't modify the input
1414

15-
bY = big(randn(n))
15+
bY = big.(randn(n))
1616
@test isapprox(qrfact(bX,Val{false}) \ bY, bS \ bY, rtol=1e3*eps(BigFloat))
1717
@test bX == X # check we didn't modify the input
1818

@@ -23,32 +23,32 @@ bSt = svdfact(bXt)
2323
@test bXt == X' # check we didn't modify the input
2424

2525
X = Float64[1 2 0; 0 1 2; 0 0 0]
26-
bX = big(X)
26+
bX = big.(X)
2727
bS = svdfact(bX)
2828
@test isapprox(full(bS), bX, rtol=1e3*eps(BigFloat))
2929
@test isapprox(svdvals(bX), svdvals(X), rtol=1e3*eps())
3030
@test bX == X # check we didn't modify the input
3131

3232
X = Float64[0 2 0; 0 1 2; 0 0 1]
33-
bX = big(X)
33+
bX = big.(X)
3434
bS = svdfact(bX)
3535
@test isapprox(full(bS), bX, rtol=1e3*eps(BigFloat))
3636
@test isapprox(svdvals(bX), svdvals(X), rtol=1e3*eps())
3737
@test bX == X # check we didn't modify the input
3838

3939

40-
bD = big(randn(m))
40+
bD = big.(randn(m))
4141
bX = diagm(bD)
4242
bS = svdfact(bX)
4343

4444
@test isapprox(full(bS), bX, rtol=1e3*eps(BigFloat))
45-
@test bS.S == sort(abs(bD),rev=true)
45+
@test bS.S == sort(abs.(bD),rev=true)
4646

4747

4848

4949

5050
X = randn(n,m)+im*randn(n,m)
51-
bX = big(X)
51+
bX = big.(X)
5252
bS = svdfact(bX)
5353
@test isapprox(full(bS), bX, rtol=1e3*eps(BigFloat))
5454
@test isapprox(svdvals(bX), svdvals(X), rtol=1e3*eps())
@@ -62,14 +62,14 @@ bSt = svdfact(bXt)
6262

6363

6464
X = Complex128[1 2 0; 0 1 2; 0 0 0]
65-
bX = big(X)
65+
bX = big.(X)
6666
bS = svdfact(bX)
6767
@test isapprox(full(bS), bX, rtol=1e3*eps(BigFloat))
6868
@test isapprox(svdvals(bX), svdvals(X), rtol=1e3*eps())
6969
@test bX == X # check we didn't modify the input
7070

7171
X = Complex128[0 2 0; 0 1 2; 0 0 1]
72-
bX = big(X)
72+
bX = big.(X)
7373
bS = svdfact(bX)
7474
@test isapprox(full(bS), bX, rtol=1e3*eps(BigFloat))
7575
@test isapprox(svdvals(bX), svdvals(X), rtol=1e3*eps())

test/misc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ c = randn()
99
U = [a c; 0 b]
1010
x,y = GenericSVD.svdvals2x2(a,b,c)
1111

12-
@test sort(sqrt(eigvals(U'*U))) [x,y]
12+
@test sort(sqrt.(eigvals(U'*U))) [x,y]
1313
@test sort(svdvals(U)) [x,y]
1414

1515
U = eye(3)

0 commit comments

Comments
 (0)