Skip to content

Commit eedad36

Browse files
juhyun-kim-uclaHua-Zhou
authored andcommitted
add extra testing functions for fisher_Σ!
1 parent 9ec962f commit eedad36

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/two_variance_component.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function gradient!(
258258
::AbstractVector,
259259
vcm::T1,
260260
vcdata::Array{T2},
261-
vcaux::Array{T3} = map(x -> VarianceComponentAuxData(x), vcdata)
261+
vcaux::Array{T3} = VarianceComponentAuxData(vcdata)# map(x -> VarianceComponentAuxData(x), vcdata)
262262
) where {
263263
T1 <: Union{VarianceComponentModel, TwoVarCompModelRotate},
264264
T2 <: Union{VarianceComponentVariate, TwoVarCompVariateRotate},

test/two_variance_component_test.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ vcmodelrot = TwoVarCompModelRotate(vcmodel)
6767
H = zeros(2d^2, 2d^2)
6868
#@code_warntype fisher!(H, vcmodelrot, vcdatarot)
6969
@inferred fisher_Σ!(H, vcmodelrot, vcdatarot)
70+
@inferred fisher_Σ!(H, vcmodel, vcdata)
7071
@test norm(fisher_Σ(vcmodel, vcdata) - fisher_Σ(vcmodelrot, vcdatarot)) 0.0
7172
@test norm(fisher_Σ(vcmodel, vcdata) - fisher_Σ(vcmodel, vcdatarot)) 0.0
7273
@test norm(fisher_Σ(vcmodel, [vcdata vcdata]) -
@@ -88,6 +89,7 @@ H = zeros(p * d, p * d)
8889
@inferred fisher_B!(H, vcmodelrot, vcdatarot)
8990
@inferred fisher_B!(H, vcmodel, vcdatarot)
9091
@inferred fisher_B!(H, vcmodel, vcdata)
92+
9193
@test norm(fisher_B(vcmodel, vcdata) - fisher_B(vcmodelrot, vcdatarot)) 0.0
9294
@test norm(fisher_B(vcmodel, vcdata) - fisher_B(vcmodel, vcdatarot)) 0.0
9395
@test norm(fisher_B(vcmodel, [vcdata vcdata]) -

0 commit comments

Comments
 (0)