Skip to content
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

BUG: stats: Inconsistency in the multivariate_normal docstring #6263 #6285

Merged
merged 2 commits into from
Jun 19, 2016

Conversation

bhavika
Copy link
Contributor

@bhavika bhavika commented Jun 18, 2016

Attempting to close #6263.

I've added a test that covers logpdf tests using the mean and cov values specified in the docstring for multivariate_normal_gen.

@rgommers rgommers added scipy.stats maintenance Items related to regular maintenance tasks labels Jun 19, 2016
x = np.random.randn(5)
d1 = multivariate_normal.logpdf(x)
d2 = multivariate_normal.pdf(x)
assert_allclose(d1, np.log(d2))
Copy link
Member

Choose a reason for hiding this comment

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

Here you test only that pdf and logpdf have consistent defaults. Probably you also want to test that the defaults are what they should be. So test (x) against (x, None, 1)

@rgommers
Copy link
Member

The extra test would be nice to have, other than that this looks good to merge. Thanks @BhavikaT

@bhavika
Copy link
Contributor Author

bhavika commented Jun 19, 2016

I can add the extra test but I'm not sure what would be a good name for it. Since we're still testing for default values, I can't think of anything better than 'test_logpdf_default_values_2' but I'm not sure this is acceptable. Is it okay if I combine the two tests?

@rgommers
Copy link
Member

Combining the two tests is perfectly fine.

@bhavika
Copy link
Contributor Author

bhavika commented Jun 19, 2016

Done. Let me know if this is correct. Thank you @rgommers.

@rgommers rgommers merged commit ffaebc9 into scipy:master Jun 19, 2016
@rgommers
Copy link
Member

Merged, thanks @BhavikaT. Keep them coming!

@rgommers rgommers added this to the 0.18.0 milestone Jun 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.stats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: stats: Inconsistency in the multivariate_normal docstring
2 participants