From 6bc518c689bcaabaecd28407058f987d1771fe29 Mon Sep 17 00:00:00 2001 From: "Brandon T. Willard" Date: Tue, 20 Apr 2021 14:21:34 -0500 Subject: [PATCH 1/2] Add a test for observed data with a broadcast dimension --- pymc3/tests/test_model.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pymc3/tests/test_model.py b/pymc3/tests/test_model.py index 66cca73169..b13210c985 100644 --- a/pymc3/tests/test_model.py +++ b/pymc3/tests/test_model.py @@ -613,3 +613,11 @@ def test_invalid_variable_name(self): model.update_start_vals(start, model.initial_point) with pytest.raises(KeyError): model.check_start_vals(start) + + +def test_observed_broadcast(): + with pm.Model() as model: + pm.Normal("x1", mu=0, sd=1, observed=np.random.normal(size=(3, 4))) + model.logp() + pm.Normal("x2", mu=0, sd=1, observed=np.random.normal(size=(3, 1))) + model.logp() From c58ca7aae746badf184ee0a08509be69bea456cc Mon Sep 17 00:00:00 2001 From: "Brandon T. Willard" Date: Tue, 20 Apr 2021 15:15:14 -0500 Subject: [PATCH 2/2] Enable Windows testing for test_model --- .github/workflows/windows.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5eb39fedd9..ef884ed463 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -7,14 +7,12 @@ on: jobs: pytest: - if: false strategy: matrix: os: [windows-latest] floatx: [float64] test-subset: - - pymc3/tests/test_distributions_random.py - - pymc3/tests/test_sampling.py + - pymc3/tests/test_model.py runs-on: ${{ matrix.os }} env: TEST_SUBSET: ${{ matrix.test-subset }}