-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Error for default params of NoneType in pm.distributions.distribution._draw_value() #3248
Comments
Maybe we can change: |
I would like to work on this issue |
@KrUciFieR-Jr There's a PR that's almost done but seems to have gone stale: #3250 I think it's just missing resolving the last item using a try-except block. You could clone @gilliss's branch, add the commit, and do a separate PR here. |
Hi! This issue does seem to have gone stale. I'd like to take it up if no one is currently working on it :) @twiecki |
@Harivallabha, sorry, this issue should have been closed after merging #3250. |
Oops, actually I got confused. This issue is still open. @Harivallabha, if you're up for the challenge feel free to go ahead. |
Yep, thank you! |
Yeah, I just went through #3250 sometime ago, and was wondering about the same xD Seemed to have been resolved :) |
I'm raising this issue following discussion at
https://discourse.pymc.io/t/error-for-default-params-of-nonetype-in-pm-distributions-distribution-draw-value/2183
I came across the following error when using
pm.distributions.continuous.TruncatedNormal.dist().random()
.The error seems to be caused by the default values of
None
for theupper
andlower
parameters of theBoundedContinuous
distribution object. That is,If I give a value to just one of 'upper' or 'lower', the error persists. If I give values to both
upper
andlower
, the error is avoided.Am I using the
random()
method in an unintended way? Perhaps it's just required that the user supply upper and lower bounds to the respective kwargs inTruncatedNormal
-- in that case, it may be desirable to make those into positional arguments (matchingscipy.stats.truncnorm
).Please provide a minimal, self-contained, and reproducible example.
Please provide the full traceback.
Please provide any additional information below.
Versions and main components
The text was updated successfully, but these errors were encountered: