You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I create a pm.Data with a vector of values for the mean of a Normal, I get a type error. When I supply the same vector of values without packaging into pm.Data, this works fine.
Please provide a minimal, self-contained, and reproducible example.
importnumpyasnpimportpymc3aspm# the following gives: TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''withpm.Model():
x=pm.Data("x", [1.0, 2.0, 3.0])
y=pm.Normal("y", mu=x, shape=3)
# same type errorwithpm.Model():
x=pm.Data("x", np.array([1.0, 2.0, 3.0]))
y=pm.Normal("y", mu=x, shape=3)
# works finewithpm.Model():
x=np.array([1.0, 2.0, 3.0])
y=pm.Normal("y", mu=x, shape=3)
Description of your problem
When I create a
pm.Data
with a vector of values for the mean of a Normal, I get a type error. When I supply the same vector of values without packaging intopm.Data
, this works fine.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: