Skip to content

Commit e3f66d9

Browse files
committed
add a test case
1 parent fa43eba commit e3f66d9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_data.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,3 +623,14 @@ def test_multiple_vars(self):
623623
[draw_mA, draw_mB] = pm.draw([mA, mB])
624624
assert draw_mA.shape == (10,)
625625
np.testing.assert_allclose(draw_mA, -draw_mB)
626+
627+
628+
def test_scaling_data_works_in_likelihood() -> None:
629+
data = np.array([10, 11, 12, 13, 14, 15])
630+
631+
with pm.Model() as model:
632+
target = pm.Data("target", data)
633+
scale = 12
634+
scaled_target = target / scale
635+
mu = pm.Normal("mu", mu=0, sigma=1)
636+
pm.Normal("x", mu=mu, sigma=1, observed=scaled_target)

0 commit comments

Comments
 (0)