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

Add test for pm.Model #2724

Merged
merged 2 commits into from
Nov 21, 2017
Merged

Add test for pm.Model #2724

merged 2 commits into from
Nov 21, 2017

Conversation

junpenglao
Copy link
Member

This PR add test for the following functions within pm.Model:

  • model.bijection
  • model.logp_array
    I also change the output from simple_model() of the testset, so it outputs sd (same as we define in pm.Normal)

This PR add test for the following functions within pm.Model:
* model.bijection
* model.logp_array
I also change the output from simple_model() of the testset, so it outputs sd (same as we define in pm.Normal)
@junpenglao
Copy link
Member Author

Should I also add this to the release note?

randarray = np.random.randn(*parray.shape)
randpoint = model.bijection.rmap(randarray)
assert lp(randpoint)==lparray(randarray)

Copy link
Member

Choose a reason for hiding this comment

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

extra new lines

lparray = model.logp_array
point = model.test_point
parray = model.bijection.map(point)
assert lp(point)==lparray(parray)
Copy link
Member

Choose a reason for hiding this comment

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

white spaces around ==

@twiecki twiecki merged commit a1976a8 into pymc-devs:master Nov 21, 2017
@junpenglao junpenglao deleted the add_test branch November 21, 2017 15:48
jordan-melendez pushed a commit to jordan-melendez/pymc3 that referenced this pull request Feb 6, 2018
* Add test for pm.Model

This PR add test for the following functions within pm.Model:
* model.bijection
* model.logp_array
I also change the output from simple_model() of the testset, so it outputs sd (same as we define in pm.Normal)

* PEP8, add release note
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.

2 participants