diff --git a/NEWS.md b/NEWS.md index a242a2838..e300e9974 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.10.1] – 2024-08-29 + +### Changed + +* `identity_element` on `ProductManifold` without `RecursiveArrayTools.jl` now prints a useful error message. + ## [0.10.0] – 2024-08-24 ### Changed diff --git a/Project.toml b/Project.toml index b563a9d71..b1680d546 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Manifolds" uuid = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e" authors = ["Seth Axen ", "Mateusz Baran ", "Ronny Bergmann ", "Antoine Levitt "] -version = "0.10.0" +version = "0.10.1" [deps] Einsum = "b7d42ee7-0b51-5a75-98ca-779d3107e4c0" @@ -55,7 +55,7 @@ HybridArrays = "0.4" Kronecker = "0.4, 0.5" LinearAlgebra = "1.6" ManifoldDiff = "0.3.7" -ManifoldsBase = "0.15.8" +ManifoldsBase = "0.15.15" Markdown = "1.6" MatrixEquations = "2.2" NLsolve = "4" diff --git a/src/groups/group.jl b/src/groups/group.jl index 537e50436..b5678dd1a 100644 --- a/src/groups/group.jl +++ b/src/groups/group.jl @@ -273,7 +273,8 @@ end function allocate_result(G::AbstractDecoratorManifold, f::typeof(identity_element)) apf = allocation_promotion_function(G, f, ()) - return zeros(apf(Float64), representation_size(G)...) + rs = representation_size(G) + return ManifoldsBase.allocate_result_array(G, f, apf(Float64), rs) end @doc raw""" diff --git a/test/groups/groups_general.jl b/test/groups/groups_general.jl index 64da8572a..c8e181765 100644 --- a/test/groups/groups_general.jl +++ b/test/groups/groups_general.jl @@ -27,7 +27,7 @@ using Manifolds: @test !has_biinvariant_metric(NotImplementedManifold()) @test !has_invariant_metric(NotImplementedManifold(), LeftForwardAction()) @test is_identity(G, eg) # identity transparent - @test_throws MethodError identity_element(G) # but for a NotImplOp there is no concrete id. + @test_throws ErrorException identity_element(G) # but for a NotImplOp there is no concrete id. @test isapprox(G, eg, eg) @test !isapprox(G, Identity(AdditionOperation()), eg) @test !isapprox(G, Identity(AdditionOperation()), eg) @@ -38,7 +38,7 @@ using Manifolds: ) @test_throws DomainError is_point(G, Identity(AdditionOperation()); error=:error) @test is_point(G, eg) - @test_throws MethodError is_identity(G, 1) # same error as before i.e. dispatch isapprox works + @test_throws ErrorException is_identity(G, 1) # same error as before i.e. dispatch isapprox works @test Manifolds.check_size(G, eg) === nothing @test Manifolds.check_size( Manifolds.EmptyTrait(), @@ -54,7 +54,7 @@ using Manifolds: error=:error, ) # identity_element for G not implemented - @test_throws MethodError is_vector(G, eg, X; error=:error) + @test_throws ErrorException is_vector(G, eg, X; error=:error) @test Identity(NotImplementedOperation()) === eg @test Identity(NotImplementedOperation) === eg @test !is_point(G, Identity(AdditionOperation())) diff --git a/test/groups/metric.jl b/test/groups/metric.jl index fa5b82fb4..f06046ae0 100644 --- a/test/groups/metric.jl +++ b/test/groups/metric.jl @@ -182,6 +182,7 @@ end #test_inplace=true, test_vee_hat=false, exp_log_atol_multiplier=50, + test_representation_size=false, ) end end diff --git a/test/groups/product_group.jl b/test/groups/product_group.jl index 2fd56f6b4..1fa4be91b 100644 --- a/test/groups/product_group.jl +++ b/test/groups/product_group.jl @@ -107,7 +107,7 @@ using RecursiveArrayTools test_mutating=false, test_adjoint_action=true, ) - test_manifold(G, pts; is_mutating=false) + test_manifold(G, pts; is_mutating=false, test_representation_size=false) @test isapprox( G, exp_lie(G, X_pts[1]), diff --git a/test/groups/special_euclidean.jl b/test/groups/special_euclidean.jl index 3942ccb6e..d063fdc98 100644 --- a/test/groups/special_euclidean.jl +++ b/test/groups/special_euclidean.jl @@ -137,6 +137,7 @@ using Manifolds: #test_inplace=true, test_vee_hat=true, exp_log_atol_multiplier=50, + test_representation_size=false, ) for CS in [CartanSchoutenMinus(), CartanSchoutenPlus(), CartanSchoutenZero()] @@ -162,6 +163,7 @@ using Manifolds: is_tangent_atol_multiplier=1, test_inner=false, test_norm=false, + test_representation_size=false, ) end end @@ -189,6 +191,7 @@ using Manifolds: is_mutating=true, exp_log_atol_multiplier=50, is_tangent_atol_multiplier=1, + test_representation_size=false, ) end end @@ -223,6 +226,7 @@ using Manifolds: test_vee_hat=true, test_is_tangent=true, # fails exp_log_atol_multiplier=50, + test_representation_size=false, ) # specific affine tests p = copy(G, pts[1]) diff --git a/test/manifolds/product_manifold.jl b/test/manifolds/product_manifold.jl index eb548a2ee..0a67fc2d7 100644 --- a/test/manifolds/product_manifold.jl +++ b/test/manifolds/product_manifold.jl @@ -93,6 +93,7 @@ using RecursiveArrayTools: ArrayPartition test_inplace=true, test_rand_point=true, test_rand_tvector=true, + test_representation_size=false, ) @testset "manifold tests (static size)" begin @@ -202,6 +203,7 @@ using RecursiveArrayTools: ArrayPartition basis_types_to_from=basis_types, is_tangent_atol_multiplier=1, exp_log_atol_multiplier=1, + test_representation_size=false, ) @test number_eltype(pts[1]) === Float64