Skip to content

Commit

Permalink
Fix critical bug
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhurford committed Sep 5, 2022
1 parent afb8956 commit d3a58d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.4

* Fix critical bug introduced in v0.3.

## v0.3

* Be able to define distributions using `mean` and `sd` instead of defining the interval.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='squigglepy',
version='0.3',
version='0.4',
author='Peter Hurford',
author_email='[email protected]',
description='Squiggle programming language for intuitive probabilistic estimation features in Python',
Expand Down
2 changes: 1 addition & 1 deletion squigglepy/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def normal_sample(low=None, high=None, mean=None, sd=None, credibility=None):


def lognormal_sample(low=None, high=None, mean=None, sd=None, credibility=None):
if low < 0 or mean < 0:
if (low is not None and low < 0) or (mean is not None and mean < 0):
raise ValueError('lognormal_sample cannot handle negative values')
if mean is None:
if low > high:
Expand Down

0 comments on commit d3a58d6

Please sign in to comment.