pymc
pymc copied to clipboard
Show dims in model textual representation
Description
Currently, there is no information about dimensionality of variables:
import pymc as pm
from pymc.printing import str_for_model
with pm.Model(coords={"trial": range(10)}) as m:
x = pm.Normal("x")
y = pm.Normal("y", dims=["trial"])
print(str_for_model(m))
x ~ Normal(0, 1)
y ~ Normal(0, 1)
Would be nice if output was something like the following:
x ~ Normal(0, 1)
y ~ Normal(0, 1, dims=[trial])
x ~ Normal(0, 1)
y ~ Normal(0, 1) [trial]
x ~ Normal(0, 1)
y[trial] ~ Normal(0, 1)
Do you like any of these. Better suggestions?