Skip to content

Commit dd5a1af

Browse files
Don't automatically mask inputs to pm.Data
1 parent 305cb5f commit dd5a1af

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pymc/data.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333

3434
import pymc as pm
3535

36-
from pymc.aesaraf import convert_observed_data
37-
3836
__all__ = [
3937
"get_data",
4038
"GeneratorAdapter",
@@ -668,9 +666,10 @@ def Data(
668666
)
669667
name = model.name_for(name)
670668

671-
# `convert_observed_data` takes care of parameter `value` and
672-
# transforms it to something digestible for Aesara.
673-
arr = convert_observed_data(value)
669+
# Conversion to floatX is important to avoid having another conversion when the variable
670+
# is used for observed somewhere. This breaks identification of the pm.Data variables
671+
# as observed data, which is a Problem for model_to_graphviz and posterior predictive sampling.
672+
arr = pm.floatX(value)
674673

675674
if mutable is None:
676675
warnings.warn(

0 commit comments

Comments
 (0)