-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Error using pm.Data as a parameter to distribution #3629
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
Comments
@rpgoldman Did you ever manage to get a minimal example. Is this still an issue? |
Yeah, I'm not sure it's still an issue actually -- I did some work on |
@AlexAndorra That's great! It would be really helpful if we could have an example and test it before and after your changes to see if the issue really disappeared with it. I tried to use it in a model and no obvious errors came up, but I am not sure how @rpgoldman was using it when he found the problem. |
@AlexAndorra I checked your PR and I think this unit test you added covers this issue perfectly: https://github.com./pymc-devs/pymc3/blob/03d7af5b6dd5ad99ab2f3bd8ca7987a744dbef46/pymc3/tests/test_data_container.py#L139 I think we can close this one, do you agree? |
Awesome, thanks for checking @ricardoV94 ! Closing 🎉 |
Description of your problem
I have made a
pm.Data
object out of data from a table. When I use this object as the value ofmu
in apm.Normal
, I get an error as follows:I am working to extract a minimal example, but meanwhile the error is here:
and occurs when trying to get the value of the
median
attribute from this variable:The value of
self.getattr_value(v)
is the result of thepm.Data
form, which is of the typetheano.tensor.sharedvar.TensorSharedVariable
.I don't know whether the issue is that the
TensorSharedVariable
does not supportnp.isfinite
, or that the code indistribution.py
does not try usingeval()
here.Using
eval()
seems to work. In the debugger I see:Please provide a minimal, self-contained, and reproducible example.
Please provide the full traceback.
The text was updated successfully, but these errors were encountered: