-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Adding a function to distributions.py #2
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
Thanks for the function, Wes. Are you also planning on implementing inverse_wishart_cov_like and inverse_wishart_cov_expval? We do actually have a script to remove trailing whitespace, just aren't as vigilant about using it as we should be. Cheers, |
Sure, I can do that for consistency's sake. I think you can set up a pre-commit hook to do it automatically on commits, there are various recipes floating around out there: http://snipplr.com/view/28523/git-precommit-hook-to-fix-trailing-whitespace/ separately there's a git config flag that warn you if there's trailing whitespace. I'm still learning the pymc codebase but I will periodically make contributions over the next few years probably, so bear with me :) |
Great, thanks! I think we'll wait for the full set of functions before pulling. Thanks also for the precommit hook, will have a look. Good luck and let us know on the ML if anything is confusing. Anand |
Got it, I'll do that soon and get back to you. Do you guys have a general testing policy for the distribution functions? |
Yes, but I didn't want to stretch the friendship. See http://github.com/pymc-devs/pymc/blob/master/pymc/tests/test_distributions.py#L968 and also http://github.com/pymc-devs/pymc/blob/master/pymc/distributions.py#L65 needs to be modified to fully integrate it. |
No problem at all. As a quid pro quo you might catch me reformatting code to fit in inside the 80 character margin, hope you don't mind terribly =) |
Anand-- on reviewing the code again, I realized that I had things backwards-- what I was looking for was an rinverse_wishart function parameterized using the precision matrix instead of the scale/covariance matrix. I got confused because the function signature is rinverse_wishart(n, Tau), and Tau means precision elsewhere (like in rwishart). I can tweak the naming convention and docs to make it clear what the distinction is. So there are some issues:
|
And testing out the git workflow.
There's a global git setting that trims trailing whitespace in files, tends to be good practice in general-- I have emacs do it automatically for me, but as you can see it creates diff cruft. Up to you...