Skip to content

Conversation

@projekter
Copy link

Currently, sampling from MatrixNormal always allocates multiple temporaries: one of the matrix X that contains the normally-sampled values, one for the matrix product A * X, and one for the matrix product (A * X) * B. However, given that A and B are triangular (and square) matrices, all products can be done in-place and the sample can directly be stored to the output. So the method doesn't need to allocate at all, provided the Cholesky factors are available without allocation.

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.36%. Comparing base (0421b18) to head (e011669).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2012   +/-   ##
=======================================
  Coverage   86.36%   86.36%           
=======================================
  Files         146      146           
  Lines        8786     8788    +2     
=======================================
+ Hits         7588     7590    +2     
  Misses       1198     1198           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@devmotion
Copy link
Member

Looks good to me. Could you add a test for it, to ensure that it doesn't regress silently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants