Skip to content

Commit a6940da

Browse files
committed
accomodate Julia v0.6
1 parent a9327f1 commit a6940da

10 files changed

+20
-24
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ os:
44
- linux
55
- osx
66
julia:
7-
- 0.4
87
- 0.5
8+
- 0.6
99
- nightly
1010
matrix:
1111
allow_failures:
@@ -23,6 +23,6 @@ after_success:
2323
notifications:
2424
email:
2525
on_success: change
26-
on_failure: always
26+
on_failure: always
2727
recipients:
2828
- esobel@ucla.edu

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Within Julia, use the package manager to install VarianceComponentModels:
1717

1818
Pkg.clone("https://github.com/OpenMendel/VarianceComponentModels.jl.git")
1919

20-
This package supports Julia v0.4 and v0.5.
20+
This package supports Julia v0.5 and v0.6.
2121

2222
## Citation
2323

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
julia 0.4
1+
julia 0.5
22

33
Compat
44
MathProgBase

appveyor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
environment:
22
matrix:
3-
- JULIAVERSION: "julialang/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe"
4-
- JULIAVERSION: "julialang/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
5-
- JULIAVERSION: "julialang/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
6-
- JULIAVERSION: "julialang/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
3+
- JULIAVERSION: "julialang/bin/winnt/x86/0.4/julia-0.5-latest-win32.exe"
4+
- JULIAVERSION: "julialang/bin/winnt/x64/0.4/julia-0.5-latest-win64.exe"
5+
- JULIAVERSION: "julialang/bin/winnt/x86/0.5/julia-0.6-latest-win32.exe"
6+
- JULIAVERSION: "julialang/bin/winnt/x64/0.5/julia-0.6-latest-win64.exe"
77
#- JULIAVERSION: "julianightlies/bin/winnt/x86/julia-latest-win32.exe"
88
#- JULIAVERSION: "julianightlies/bin/winnt/x64/julia-latest-win64.exe"
99

src/VarianceComponentModels.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function TwoVarCompModelRotate{T, BT, ΣT}(
122122
λ = convert(Vector{T}, F.values)
123123
Φ = convert(Matrix{T}, F.vectors)
124124
# correct negative eigenvalues due to roundoff
125-
map!(x -> max(x, zero(T)), λ)
125+
@compat map!(x -> max(x, zero(T)), λ, λ)
126126
Brot = isempty(vcm.B) ? Array{T}(size(vcm.B)) : vcm.B * Φ
127127
logdetΣ2 = convert(T, logdet(vcm.Σ[2]))
128128
TwoVarCompModelRotate{T, BT}(Brot, λ, Φ, logdetΣ2)

src/two_variance_component.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -904,11 +904,11 @@ function mle_fs!{T1<:VarianceComponentModel, T2<:TwoVarCompVariateRotate}(
904904
Bcov = zeros(T, nmean, nmean)
905905
Bcov = pinv(fisher_B(vcmodel, vcdatarot, dd.vcaux))
906906
Bse = similar(vcmodel.B)
907-
copy!(Bse, sqrt(diag(Bcov)))
907+
copy!(Bse, sqrt.(diag(Bcov)))
908908
Σcov = pinv(fisher_Σ(vcmodel, vcdatarot))
909909
Σse = (zeros(T, d, d), zeros(T, d, d))
910-
copy!(Σse[1], sqrt(diag(view(Σcov, 1:d^2, 1:d^2))))
911-
copy!(Σse[2], sqrt(diag(view(Σcov, d^2+1:2d^2, d^2+1:2d^2))))
910+
copy!(Σse[1], sqrt.(diag(view(Σcov, 1:d^2, 1:d^2))))
911+
copy!(Σse[2], sqrt.(diag(view(Σcov, d^2+1:2d^2, d^2+1:2d^2))))
912912

913913
# output
914914
maxlogl, vcmodel, Σse, Σcov, Bse, Bcov
@@ -1105,11 +1105,11 @@ function mle_mm!{T1 <: VarianceComponentModel, T2 <: TwoVarCompVariateRotate}(
11051105
# standard errors
11061106
Bcov = pinv(fisher_B(vcm, vcdatarot, vcaux))
11071107
Bse = similar(vcm.B)
1108-
copy!(Bse, sqrt(diag(Bcov)))
1108+
copy!(Bse, sqrt.(diag(Bcov)))
11091109
Σcov = pinv(fisher_Σ(vcm, vcdatarot))
11101110
Σse = (zeros(T, d, d), zeros(T, d, d))
1111-
copy!(Σse[1], sqrt(diag(view(Σcov, 1:d^2, 1:d^2))))
1112-
copy!(Σse[2], sqrt(diag(view(Σcov, d^2+1:2d^2, d^2+1:2d^2))))
1111+
copy!(Σse[1], sqrt.(diag(view(Σcov, 1:d^2, 1:d^2))))
1112+
copy!(Σse[2], sqrt.(diag(view(Σcov, d^2+1:2d^2, d^2+1:2d^2))))
11131113

11141114
# output
11151115
logl, vcm, Σse, Σcov, Bse, Bcov
@@ -1240,7 +1240,7 @@ function fit_reml!{
12401240
# standard errors and covariance of mean parameters
12411241
Bcov = inv(fisher_B(vcmodel, vcdatarot, vcaux))
12421242
Bse = similar(vcmodel.B)
1243-
copy!(Bse, sqrt(diag(Bcov)))
1243+
copy!(Bse, sqrt.(diag(Bcov)))
12441244

12451245
# output
12461246
logpdf(vcmodel, vcdatarot), vcmodel, Σse, Σcov, Bse, Bcov

test/REQUIRE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
BaseTestNext

test/multivariate_calculus_test.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module MultivariateCalculusTest
22

3-
using VarianceComponentModels
4-
using BaseTestNext
3+
using VarianceComponentModels, Base.Test
54

65
srand(123)
76

@@ -102,7 +101,7 @@ end
102101
dX2[i, j] = vecdot(Y, M[(i-1)*p+1:i*p, (j-1)*r+1:j*r])
103102
end
104103
end
105-
@test_approx_eq_eps vecnorm(dX1 - vec(dX2)) 0.0 1.0e-8
104+
@test vecnorm(dX1 - vec(dX2)) < 1e-8
106105
end
107106

108107
# test duplication

test/two_variance_component_test.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module TwoVarianceComponentTest
22

3-
using VarianceComponentModels, MathProgBase, Ipopt
4-
using BaseTestNext
3+
using VarianceComponentModels, MathProgBase, Ipopt, Base.Test
54

65
srand(123)
76

test/variance_component_models_test.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module VarianceComponentTypeTest
22

3-
using VarianceComponentModels, MathProgBase, Ipopt
4-
using BaseTestNext
3+
using VarianceComponentModels, MathProgBase, Ipopt, Base.Test
54

65
srand(123)
76

0 commit comments

Comments
 (0)