We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sample_prior_predictive() sample parameter fails on tuple (models with deterministics and symbolic tensors?) as per discussion from @lucianopaz here
sample_prior_predictive()
Please provide a minimal, self-contained, and reproducible example.
import pymc3 as pm with pm.Model(): var = pm.distributions.continuous.InverseGamma('var', alpha=1, beta=1) pm.distributions.continuous.Normal('x', mu=0, sd=pm.math.sqrt(var)) print(pm.sample_prior_predictive(samples=(1,10)))
Please provide the full traceback.
File "//anaconda3/lib/python3.7/site-packages/pymc3/sampling.py", line 1325, in sample_prior_predictive values = draw_values([model[name] for name in names], size=samples) File "//anaconda3/lib/python3.7/site-packages/pymc3/distributions/distribution.py", line 369, in draw_values size=size) File "//anaconda3/lib/python3.7/site-packages/pymc3/distributions/distribution.py", line 463, in _draw_value return param.random(point=point, size=size) File "//anaconda3/lib/python3.7/site-packages/pymc3/model.py", line 43, in __call__ return getattr(self.obj, self.method_name)(*args, **kwargs) File "//anaconda3/lib/python3.7/site-packages/pymc3/distributions/continuous.py", line 457, in random point=point, size=size) File "//anaconda3/lib/python3.7/site-packages/pymc3/distributions/distribution.py", line 400, in draw_values size=size) File "//anaconda3/lib/python3.7/site-packages/pymc3/distributions/distribution.py", line 508, in _draw_value output = np.array([func(*v) for v in zip(*values)]) File "//anaconda3/lib/python3.7/site-packages/pymc3/distributions/distribution.py", line 508, in <listcomp> output = np.array([func(*v) for v in zip(*values)]) File "//anaconda3/lib/python3.7/site-packages/theano/compile/function_module.py", line 813, in __call__ allow_downcast=s.allow_downcast) File "//anaconda3/lib/python3.7/site-packages/theano/tensor/type.py", line 178, in filter data.shape)) TypeError: Bad input argument to theano function with name "//anaconda3/lib/python3.7/site-packages/pymc3/distributions/distribution.py:431" at index 0 (0-based). Wrong number of dimensions: expected 0, got 1 with shape (10,).
The text was updated successfully, but these errors were encountered:
Closed via #3456
Sorry, something went wrong.
No branches or pull requests
Description of your problem
sample_prior_predictive()
sample parameter fails on tuple (models with deterministics and symbolic tensors?) as per discussion from @lucianopaz herePlease provide a minimal, self-contained, and reproducible example.
Please provide the full traceback.
Versions and main components
The text was updated successfully, but these errors were encountered: