Skip to content

Commit 7769842

Browse files
committed
Rename bounds_check to check_bounds as per @ricardoV94
1 parent e67304a commit 7769842

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

RELEASE-NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It also brings some dreadfully awaited fixes, so be sure to go through the chang
1616
- Removed `theanof.set_theano_config` because it illegally changed Theano's internal state (see [#4329](https://github.com/pymc-devs/pymc3/pull/4329)).
1717

1818
### New Features
19-
- Option to set `bounds_check=False` when instantiating `pymc3.Model()`. This turns off bounds checks that ensure that input parameters of distributions are valid. For most models, this unneccessary as all parameters get automatically transformed. Turning this off should lead to faster sampling (see [#4377](https://github.com/pymc-devs/pymc3/pull/4377)).
19+
- Option to set `check_bounds=False` when instantiating `pymc3.Model()`. This turns off bounds checks that ensure that input parameters of distributions are valid. For most models, this unneccessary as all parameters get automatically transformed. Turning this off should lead to faster sampling (see [#4377](https://github.com/pymc-devs/pymc3/pull/4377)).
2020
- `OrderedProbit` distribution added (see [#4232](https://github.com/pymc-devs/pymc3/pull/4232)).
2121
- `plot_posterior_predictive_glm` now works with `arviz.InferenceData` as well (see [#4234](https://github.com/pymc-devs/pymc3/pull/4234))
2222

pymc3/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ class Model(Factor, WithMemoization, metaclass=ContextMeta):
809809
temporarily in the model context. See the documentation
810810
of theano for a complete list. Set config key
811811
``compute_test_value`` to `raise` if it is None.
812-
bounds_check: bool
812+
check_bounds: bool
813813
Ensure that input parameters to distributions are in a valid
814814
range. If your model is built in a way where you know your
815815
parameters can only take on valid values you can set this to
@@ -900,12 +900,12 @@ def __new__(cls, *args, **kwargs):
900900
instance._theano_config = theano_config
901901
return instance
902902

903-
def __init__(self, name="", model=None, theano_config=None, coords=None, bounds_check=False):
903+
def __init__(self, name="", model=None, theano_config=None, coords=None, check_bounds=False):
904904
self.name = name
905905
self.coords = {}
906906
self.RV_dims = {}
907907
self.add_coords(coords)
908-
self.bounds_check = bounds_check
908+
self.check_bounds = check_bounds
909909

910910
if self.parent is not None:
911911
self.named_vars = treedict(parent=self.parent.named_vars)

pymc3/tests/test_dist_math.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def test_bound():
6060
assert np.prod(bound(logp, cond).eval()) == -np.inf
6161

6262

63-
def test_bound_disabled():
64-
with pm.Model(bounds_check=False):
63+
def test_check_bounds_false():
64+
with pm.Model(check_bounds=False):
6565
logp = tt.ones(3)
6666
cond = np.array([1, 0, 1])
6767
assert np.all(bound(logp, cond).eval() == logp.eval())

0 commit comments

Comments
 (0)