File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1672,13 +1672,16 @@ def test_Triangular(
1672
1672
1673
1673
def test_get_constant_coords ():
1674
1674
with pm .Model () as model :
1675
- model .add_coord ("coord0" , length = 1 )
1675
+ model .add_coord ("length_coord" , length = 1 )
1676
+ model .add_coord ("value_coord" , values = (3 ,))
1676
1677
1677
- trace_coords_same_len = {"coord0" : np .array ([0 ])}
1678
- assert "coord0" in get_constant_coords (trace_coords_same_len , model )
1678
+ trace_coords_same = {"length_coord" : np .array ([0 ]), "value_coord" : np .array ([3 ])}
1679
+ constant_coords_same = get_constant_coords (trace_coords_same , model )
1680
+ assert constant_coords_same == {"length_coord" , "value_coord" }
1679
1681
1680
- trace_coords_diff_len = {"coord0" : np .array ([0 , 1 ])}
1681
- assert "coord0" not in get_constant_coords (trace_coords_diff_len , model )
1682
+ trace_coords_diff = {"length_coord" : np .array ([0 , 1 ]), "value_coord" : np .array ([4 ])}
1683
+ constant_coords_diff = get_constant_coords (trace_coords_diff , model )
1684
+ assert constant_coords_diff == set ()
1682
1685
1683
1686
1684
1687
def test_get_vars_in_point_list ():
You can’t perform that action at this time.
0 commit comments