File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1062,7 +1062,7 @@ def test_deterministic():
10621062 assert model ["y" ] == y
10631063
10641064
1065- def test_potential_with_dims ():
1065+ def test_determinsitic_with_dims ():
10661066 """
10671067 Test to check the passing of dims to the potential
10681068 """
@@ -1072,6 +1072,16 @@ def test_potential_with_dims():
10721072 assert model .named_vars_to_dims == {"y" : ("observed" ,)}
10731073
10741074
1075+ def test_potential_with_dims ():
1076+ """
1077+ Test to check the passing of dims to the potential
1078+ """
1079+ with pm .Model (coords = {"observed" : range (10 )}) as model :
1080+ x = pm .Normal ("x" , 0 , 1 )
1081+ y = pm .Potential ("y" , x ** 2 , dims = ("observed" ,))
1082+ assert model .named_vars_to_dims == {"y" : ("observed" ,)}
1083+
1084+
10751085def test_empty_model_representation ():
10761086 assert pm .Model ().str_repr () == ""
10771087
You can’t perform that action at this time.
0 commit comments