Skip to content

Commit 9792dff

Browse files
committed
Test multiple None dims work together
1 parent d4e5db1 commit 9792dff

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/model/test_core.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -899,12 +899,14 @@ def test_none_coords_autonumbering(self):
899899
# TODO: Either allow dims without coords everywhere or nowhere
900900
with pm.Model() as m:
901901
m.add_coord(name="a", values=None, length=3)
902-
m.add_coord(name="b", values=range(5))
903-
x = pm.Normal("x", dims=("a", "b"))
902+
m.add_coord(name="b", values=range(-5, 0))
903+
m.add_coord(name="c", values=None, length=7)
904+
x = pm.Normal("x", dims=("a", "b", "c"))
904905
prior = pm.sample_prior_predictive(draws=2).prior
905-
assert prior["x"].shape == (1, 2, 3, 5)
906+
assert prior["x"].shape == (1, 2, 3, 5, 7)
906907
assert list(prior.coords["a"].values) == list(range(3))
907-
assert list(prior.coords["b"].values) == list(range(5))
908+
assert list(prior.coords["b"].values) == list(range(-5, 0))
909+
assert list(prior.coords["c"].values) == list(range(7))
908910

909911
def test_set_data_indirect_resize_without_coords(self):
910912
with pm.Model() as pmodel:

0 commit comments

Comments
 (0)