File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 92
92
]
93
93
94
94
95
+ # Temporarily add an Aesara dispatch for PyTensor TensorVariable to inform users
96
+ # of incorrect mixing of libraries
97
+ try :
98
+ from aesara .tensor import _as_tensor_variable as _as_tensor_variable_aesara
99
+
100
+ @_as_tensor_variable_aesara .register (TensorVariable )
101
+ def raise_informative_error (* args , ** kwargs ):
102
+ raise TypeError (
103
+ "You are calling an Aesara function with PyTensor variables.\n "
104
+ "Starting with PyMC 5.0, Aesara was replaced by PyTensor (see https://www.pymc.io/blog/pytensor_announcement.html).\n "
105
+ "Replace your import of aesara.tensor with pytensor.tensor." ,
106
+ )
107
+
108
+ except ImportError :
109
+ pass
110
+
111
+
95
112
def convert_observed_data (data ):
96
113
"""Convert user provided dataset to accepted formats."""
97
114
You can’t perform that action at this time.
0 commit comments