Skip to content

Commit

Permalink
specify the mode
Browse files Browse the repository at this point in the history
  • Loading branch information
wd60622 committed Jan 28, 2025
1 parent b182686 commit b2a3d1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pymc/pytensorf.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ def extract_obs_data(x: TensorVariable) -> np.ndarray:
from pymc.data import has_random_ancestor

if not has_random_ancestor(x):
return x.eval()
cheap_eval_mode = Mode(linker="py", optimizer=None)
return x.eval(mode=cheap_eval_mode)

raise TypeError(f"Data cannot be extracted from {x}")

Expand Down

0 comments on commit b2a3d1e

Please sign in to comment.