Skip to content

Added check that nu must be a scalar in MvStudentTRV #5241

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

Merged
merged 3 commits into from
Dec 12, 2021

Conversation

sagartomar
Copy link
Contributor

This should fix issue #5214

@codecov
Copy link

codecov bot commented Dec 5, 2021

Codecov Report

Merging #5241 (24316b2) into main (a4f9657) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5241   +/-   ##
=======================================
  Coverage   79.12%   79.13%           
=======================================
  Files          88       88           
  Lines       14306    14311    +5     
=======================================
+ Hits        11320    11325    +5     
  Misses       2986     2986           
Impacted Files Coverage Δ
pymc/distributions/multivariate.py 73.39% <100.00%> (+0.19%) ⬆️

Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I left a suggestion below, and we should add a test that covers this branch.

Perhaps in test_distributions_random you can add something along the lines of the following one:

def test_errors(self):
msg = "MatrixNormal doesn't support size argument"
with pm.Model():
with pytest.raises(NotImplementedError, match=msg):
matrixnormal = pm.MatrixNormal(
"matnormal",
mu=np.random.random((3, 3)),
rowcov=np.eye(3),
colcov=np.eye(3),
size=15,
)

Copy link
Member

@michaelosthege michaelosthege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
I like the re.escape(msg) it always takes me ages to find the right escape syntax..

Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great

@ricardoV94 ricardoV94 merged commit f369137 into pymc-devs:main Dec 12, 2021
@sagartomar sagartomar deleted the mvstudentt branch December 12, 2021 07:29
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