diff --git a/NDTensors/src/tensor/tensor.jl b/NDTensors/src/tensor/tensor.jl index 3d55fd7fd7..8bc0b19796 100644 --- a/NDTensors/src/tensor/tensor.jl +++ b/NDTensors/src/tensor/tensor.jl @@ -235,8 +235,8 @@ conj(T::Tensor) = conj(AllowAlias(), T) randn!!(T::Tensor) = randn!!(Random.default_rng(), T) function randn!!(rng::AbstractRNG, T::Tensor) ## TODO for functions like this we should really call generic_randn - T = allocate(T) - (randn!(rng, T); T) + T = allocate(T) + return (randn!(rng, T); T) end Random.randn!(T::Tensor) = randn!(Random.default_rng(), T)