Skip to content

Commit d580ecf

Browse files
committed
fix test, compat ArrayPartition
1 parent 37b8e37 commit d580ecf

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ManifoldsBase = "3362f125-f0bb-47a3-aa74-596ffd7ef2fb"
1717
Neo4j = "d2adbeaf-5838-5367-8a2f-e46d570981db"
1818
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
1919
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
20+
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
2021
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
2122
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
2223
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"

src/DistributedFactorGraphs.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ import ManifoldsBase
3636
import ManifoldsBase: AbstractManifold, manifold_dimension
3737
export AbstractManifold, manifold_dimension
3838

39+
import RecursiveArrayTools: ArrayPartition
40+
export ArrayPartition
41+
3942
import Base: getindex
4043

4144

test/test_defVariable.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ struct NotAManifold end
2727
# @test getPointType(TestVarType2) == ProductRepr{Tuple{Vector{Float64}, Matrix{Float64}}}
2828

2929
@test getPointIdentity(TestVarType1) == zeros(3)
30-
@test getPointIdentity(TestVarType2).parts[1] == ArrayPartition(zeros(3), diagm(ones(3))).parts[1]
31-
@test getPointIdentity(TestVarType2).parts[2] == ArrayPartition(zeros(3), diagm(ones(3))).parts[2]
30+
@test getPointIdentity(TestVarType2)[1] == ArrayPartition(zeros(3), diagm(ones(3)))[1]
31+
@test getPointIdentity(TestVarType2)[2] == ArrayPartition(zeros(3), diagm(ones(3)))[2]
3232

3333
##
3434

@@ -43,7 +43,7 @@ struct NotAManifold end
4343
# @test getPointType(TestVarType2()) == ProductRepr{Tuple{Vector{Float64}, Matrix{Float64}}}
4444

4545
@test getPointIdentity(TestVarType1()) == zeros(3)
46-
@test getPointIdentity(TestVarType2()).parts[1] == ArrayPartition(zeros(3), diagm(ones(3))).parts[1]
47-
@test getPointIdentity(TestVarType2()).parts[2] == ArrayPartition(zeros(3), diagm(ones(3))).parts[2]
46+
@test getPointIdentity(TestVarType2())[1] == ArrayPartition(zeros(3), diagm(ones(3)))[1]
47+
@test getPointIdentity(TestVarType2())[2] == ArrayPartition(zeros(3), diagm(ones(3)))[2]
4848

4949
end

0 commit comments

Comments
 (0)