From 4b2c4b848ed40670698b45a0954d7b29ed8db3c2 Mon Sep 17 00:00:00 2001 From: Mateusz Baran Date: Fri, 17 Jan 2025 17:23:09 +0100 Subject: [PATCH] add type to arg --- src/interface.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index 8c3c6fde..e1aad481 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -912,7 +912,7 @@ end function Random.rand(rng::AbstractRNG, M::AbstractManifold, T::Type, d::Integer; kwargs...) return [rand(rng, M, T; kwargs...) for _ in 1:d] end -function Random.rand(M::AbstractManifold, T; vector_at=nothing, kwargs...) +function Random.rand(M::AbstractManifold, T::Type; vector_at=nothing, kwargs...) if vector_at === nothing pX = allocate_on(M, T) else @@ -921,7 +921,9 @@ function Random.rand(M::AbstractManifold, T; vector_at=nothing, kwargs...) rand!(M, pX; vector_at=vector_at, kwargs...) return pX end -function Random.rand(rng::AbstractRNG, M::AbstractManifold, T; vector_at=nothing, kwargs...) +function Random.rand( + rng::AbstractRNG, M::AbstractManifold, T::Type; vector_at=nothing, kwargs... +) if vector_at === nothing pX = allocate_on(M, T) else