diff --git a/pymc3/data.py b/pymc3/data.py index 28b8131a46a..cac3b97ba3a 100644 --- a/pymc3/data.py +++ b/pymc3/data.py @@ -449,7 +449,4 @@ def __new__(self, name, value): "inside a 'with model:' block.") model.add_random_variable(shared_object) - # mark this as a data object - shared_object.is_data = True - return shared_object diff --git a/pymc3/model_graph.py b/pymc3/model_graph.py index 1a08c7b95ce..5b4954f36c6 100644 --- a/pymc3/model_graph.py +++ b/pymc3/model_graph.py @@ -103,17 +103,11 @@ def _make_node(self, var_name, graph): # Get name for node if hasattr(v, 'distribution'): distribution = v.distribution.__class__.__name__ + elif isinstance(v, SharedVariable): + distribution = 'Data' else: - is_data = False # type: bool - try: - is_data = v.is_data - except AttributeError: - pass - if is_data: - distribution = 'Data' - else: - distribution = 'Deterministic' - attrs['shape'] = 'box' + distribution = 'Deterministic' + attrs['shape'] = 'box' graph.node(var_name.replace(':', '&'), '{var_name} ~ {distribution}'.format(var_name=var_name, distribution=distribution),