pymc
pymc copied to clipboard
Do not monkey-patch Ipython pretty representation on model variables
Only model objects will have a default Ipython/Jupyter representation.
This simplifies the codebase and saves half a second of import time.
Before:
import pymc as pm
with pm.Model() as m:
x = pm.Normal("x")
a = pm.Deterministic("a", x + 1)
y = pm.Normal("y", a)
# Before this would print x ~ Nomal(0, 1)
# Now it just prints x (the name)
x
# x
# Still prints the same as before
m
# x ~ Normal(0, 1)
# y ~ Normal(f(x), 1)
# a ~ Deterministic(f(x))
📚 Documentation preview 📚: https://pymc--7712.org.readthedocs.build/en/7712/