Closed olivierverdier closed 10 months ago
Yes, that's something I need to fix. I will do it when I get a bit of free time.
I've prepared a PR with a fix: https://github.com/JuliaManifolds/Manifolds.jl/pull/677 . allocate_result(G, typeof(rand), Identity(G))
doesn't work but allocate_result(G, typeof(rand))
does. I can make allocate_result(G, typeof(rand), Identity(G))
also work but it's a bit more work.
Nice! The Identity
one is really not important, you can just ignore it.
Consider a complex group, for instance
Now, the identity element is a matrix of floats (probably normal so far?)
The problem is with allocation (I suppose?). First, this works well:
But this doesn't:
And, what I would perhaps like best, this doesn't either:
Note: I came across this issue by trying to implement a
rand!
function for complex groups, for testing purposes, and not by playing around withallocate_result
, which, I understand, is for internal use.