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 positional arguments for Bounded RVs #3446

Merged
merged 3 commits into from
Apr 10, 2019
Merged

Conversation

sshekh
Copy link
Contributor

@sshekh sshekh commented Apr 8, 2019

Fixes #3399 . *args from Bound.__call__ was mixing with parameters passed to _ContinuousBounded. i.e

    def __init__(self, distribution, lower, upper,
                 transform='infer', *args, **kwargs):

Here *args was supposed to be arguments for the distribution but dist.init will put positional arguments *args before keyword arguments when calling the constructor for _ContinuousBounded, thus mixing the arguments.

I have changed all calls to the _ContinuousBounded constructor to use only (and all) positional arguments. Also added a test to reproduce the issue

Copy link
Contributor

@lucianopaz lucianopaz left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @sshekh! You should add a line describing this fix in RELEASE-NOTES.md at the end of the maintenance section

@sshekh
Copy link
Contributor Author

sshekh commented Apr 9, 2019

@lucianopaz Updated the RELEASE-NOTES. Thanks!

@ColCarroll
Copy link
Member

Thanks @sshekh! This looks good to me -- I'll wait for lucianopaz to merge.

@lucianopaz lucianopaz merged commit c8d8ee1 into pymc-devs:master Apr 10, 2019
@lucianopaz
Copy link
Contributor

Thanks @sshekh!

@sshekh sshekh deleted the patch-1 branch April 27, 2019 09:38
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.

4 participants