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

fix #4216: str and latex representations for Bound variables #4217

Merged
merged 8 commits into from
Nov 15, 2020

Conversation

Spaak
Copy link
Member

@Spaak Spaak commented Nov 10, 2020

Fixes #4216.

This:

import pymc3 as pm

with pm.Model() as model:
  bound_var = pm.Bound(pm.Normal, lower=1.0)('bound_var', mu=0, sigma=10)
  print(str(bound_var))

will now give this:

bound_var ~ Bound(lower=1.0, upper=None)-Normal(mu=0.0, sigma=10.0)

@codecov
Copy link

codecov bot commented Nov 10, 2020

Codecov Report

Merging #4217 (87157bc) into master (3f14968) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4217   +/-   ##
=======================================
  Coverage   88.91%   88.92%           
=======================================
  Files          89       89           
  Lines       14429    14441   +12     
=======================================
+ Hits        12829    12841   +12     
  Misses       1600     1600           
Impacted Files Coverage Δ
pymc3/distributions/bound.py 92.36% <100.00%> (+0.76%) ⬆️
pymc3/util.py 94.38% <100.00%> (ø)

@michaelosthege
Copy link
Member

LGTM !
Feel free to mention this fix (linking to this PR) in the corresponding section of the RELEASE-NOTES.md

@michaelosthege michaelosthege added this to the 3.10 milestone Nov 13, 2020
@michaelosthege michaelosthege merged commit 0b07970 into pymc-devs:master Nov 15, 2020
@Spaak
Copy link
Member Author

Spaak commented Nov 15, 2020

@michaelosthege Thanks, and sorry for the slow reply. I've now added these (and the general __str__ overhaul for which this is a fix) to the release notes as PR #4227 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix string representation for Bounded distributions
2 participants