-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Fix MultivariateNormal density calculation when symbolic parameters are used #21650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Hi, I am the SymPy bot (v161). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.9. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
@czgdp1807 @Upabjojr can you review this? |
If possible (like if it isn't too tricky to do) add an example to the docs as well for this case. Thanks. Rest if fine. |
@czgdp1807 All done. |
@oscarbenjamin @czgdp1807 @Abdullahjavednesar Hello everyone - just following up to see if anything more needs to be done. |
Looks good, thanks! |
References to other Issues or PRs
Fixes #21635
Brief description of what is fixed or changed
The
pdf
method for theMultivariateNormalDistribution
has been updated:MatrixElement
to return the[0, 0]
value of the density calculation, that returns a[1, 1]
matrix. This has been changed from accessing the element directly using[0]
, as this throws an error when certain arguments are symbolic.ImmutableMatrix
. I've added this because passing a matrix with a symbolic number of elements causes the argument to be coerced to a1x1
matrix, with the original matrix at the[0, 0]
index.Other comments
While running tests, I noticed that the
test_sample_pymc3
test breaks (I have pymc3 installed). This is also true for the code on master and is unrelated to this PR.Release Notes