JuliaMath / JuliaMath/RandomMatrices.jl

support StaticArrays

Open
#64 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
94
Forks
41
PR merge metrics
No merged PRs in 30d

Description

It would be nice if the various `rand(...)` functions supported returning an `SMatrix`, for example if `::Val{n}` is passed instead of `n::Integer`.

This improves performance and reduces memory allocations in cases where lots of small matrices need to be sampled. e.g. see [this example from discourse](https://discourse.julialang.org/t/code-speed-decreases-when-loop-number-increases/78920) which generates lots of 2x2 and 4x4 Haar-distributed unitary matrices.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.