From b2c8f722997f294f965bd494e356ff46e1909c7c Mon Sep 17 00:00:00 2001 From: Mateusz Baran Date: Tue, 12 Nov 2024 14:10:09 +0100 Subject: [PATCH] Improve coordinate allocation --- NEWS.md | 6 ++++++ Project.toml | 2 +- src/bases.jl | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 04ca4239..550f72d5 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.15.21] 12/11/2024 + +### Fixed + +* Coordinate allocation was improved to be more friendly with automatic differentiation. + ## [0.15.20] 24/10/2024 ### Changed diff --git a/Project.toml b/Project.toml index 12d86074..7f0fa8ac 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ManifoldsBase" uuid = "3362f125-f0bb-47a3-aa74-596ffd7ef2fb" authors = ["Seth Axen ", "Mateusz Baran ", "Ronny Bergmann ", "Antoine Levitt "] -version = "0.15.20" +version = "0.15.21" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/src/bases.jl b/src/bases.jl index aa37118e..52fccd64 100644 --- a/src/bases.jl +++ b/src/bases.jl @@ -561,7 +561,9 @@ function _get_coordinates(M::AbstractManifold, p, X, B::DefaultOrthonormalBasis) return get_coordinates_orthonormal(M, p, X, number_system(B)) end function get_coordinates_orthonormal(M::AbstractManifold, p, X, N) - c = allocate_result(M, get_coordinates, p, X, DefaultOrthonormalBasis(N)) + # arguments X and p for allocate_result are intentionally reversed + # to make ManifoldDiff.jl tests pass + c = allocate_result(M, get_coordinates, X, p, DefaultOrthonormalBasis(N)) return get_coordinates_orthonormal!(M, c, p, X, N) end