Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #613 #614

Merged
merged 2 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Manifolds"
uuid = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e"
authors = ["Seth Axen <seth.axen@gmail.com>", "Mateusz Baran <mateuszbaran89@gmail.com>", "Ronny Bergmann <manopt@ronnybergmann.net>", "Antoine Levitt <antoine.levitt@gmail.com>"]
version = "0.8.64"
version = "0.8.65"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
5 changes: 3 additions & 2 deletions src/groups/group.jl
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,9 @@ function is_vector(
kwargs...,
)
if cbp
ie = is_point(G, e; kwargs...)
(!te) && return ie
# pass te down so this throws an error if te=true
# if !te and is_point was false -> return false, otherwise continue
(!te && !is_point(G, e, te; kwargs...)) && return false
end
return is_vector(next_trait(t), G, identity_element(G), X, te, false; kwargs...)
end
Expand Down
8 changes: 5 additions & 3 deletions test/groups/special_orthogonal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ include("group_utils.jl")
@test isapprox(p, exp_lie(G, log_lie(G, p)))
end
end

@testset "Decorator forwards to group" begin
DM = NotImplementedGroupDecorator(G)
test_group(DM, pts, Xpts, Xpts; test_diff=true)
end

@testset "Group forwards to decorated" begin
retraction_methods = [
Manifolds.PolarRetraction(),
Expand Down Expand Up @@ -134,7 +132,6 @@ include("group_utils.jl")
project!(G, z2, z)
@test isapprox(M, z2, project(M, z))
end

@testset "vee/hat" begin
X = Xpts[1]
pe = Identity(G)
Expand Down Expand Up @@ -178,5 +175,10 @@ include("group_utils.jl")
e2 = Identity(G)
@test mul!(e2, e, e) === e2
end
@testset "Identity and point/vector check" begin
# see https://github.com/JuliaManifolds/Manifolds.jl/issues/613
@test !is_vector(G, gI, ones(n, n)) #not skew
@test !is_vector(G, gI, ones(n)) # wrong size
end
end
end