We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f71397 commit b182686Copy full SHA for b182686
pymc/pytensorf.py
@@ -177,6 +177,11 @@ def extract_obs_data(x: TensorVariable) -> np.ndarray:
177
mask[mask_idx] = 1
178
return np.ma.MaskedArray(array_data, mask)
179
180
+ from pymc.data import has_random_ancestor
181
+
182
+ if not has_random_ancestor(x):
183
+ return x.eval()
184
185
raise TypeError(f"Data cannot be extracted from {x}")
186
187
0 commit comments