Skip to content

Commit 0bf1c8c

Browse files
fonnesbeckColCarroll
authored andcommitted
Changed support of exponential to include zero (#2914)
* Changed support of exponential to include zero * Added exponential fix to release notes
1 parent e3c4d87 commit 0bf1c8c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- fix PyMC3 variable is not replaced if provided in more_replacements (#2890)
3030
- Fix for issue #2900. For many situations, named node-inputs do not have a `random` method, while some intermediate node may have it. This meant that if the named node-input at the leaf of the graph did not have a fixed value, `theano` would try to compile it and fail to find inputs, raising a `theano.gof.fg.MissingInputError`. This was fixed by going through the theano variable's owner inputs graph, trying to get intermediate named-nodes values if the leafs had failed.
3131
- In `distribution.draw_values`, some named nodes could be `theano.tensor.TensorConstant`s or `theano.tensor.sharedvar.SharedVariable`s. Nevertheless, in `distribution._draw_value`, these would be passed to `distribution._compile_theano_function` as if they were `theano.tensor.TensorVariable`s. This could lead to the following exceptions `TypeError: ('Constants not allowed in param list', ...)` or `TypeError: Cannot use a shared variable (...)`. The fix was to not add `theano.tensor.TensorConstant` or `theano.tensor.sharedvar.SharedVariable` named nodes into the `givens` dict that could be used in `distribution._compile_theano_function`.
32+
- Exponential support changed to include zero values.
3233

3334
### Deprecations
3435

pymc3/distributions/continuous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ def random(self, point=None, size=None, repeat=None):
755755

756756
def logp(self, value):
757757
lam = self.lam
758-
return bound(tt.log(lam) - lam * value, value > 0, lam > 0)
758+
return bound(tt.log(lam) - lam * value, value >= 0, lam > 0)
759759

760760
def _repr_latex_(self, name=None, dist=None):
761761
if dist is None:

0 commit comments

Comments
 (0)