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 72f16ee commit a942b6eCopy full SHA for a942b6e
tests/test_model.py
@@ -1062,6 +1062,16 @@ def test_deterministic():
1062
assert model["y"] == y
1063
1064
1065
+def test_potential_with_dims():
1066
+ """
1067
+ Test to check the passing of dims to the potential
1068
1069
+ with pm.Model(coords={"observed": range(10)}) as model:
1070
+ x = pm.Normal("x", 0, 1)
1071
+ y = pm.Deterministic("y", x**2, dims=("observed",))
1072
+ assert model.named_vars_to_dims == {"y": ("observed",)}
1073
+
1074
1075
def test_empty_model_representation():
1076
assert pm.Model().str_repr() == ""
1077
0 commit comments