Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/test_log_prob.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
["-5.5395901199", "-1.4903938392"],
),
(3, ["-7.02", "-1.19"], ["-5.54", "-1.49"]),
(None, ["-7.02147", "-1.18847"], ["-5.53959", "-1.49039"]),
(None, ["-7.0214668", "-1.1884726"], ["-5.5395901", "-1.4903938"]),
],
)
def test_lp_good(
Expand Down
8 changes: 4 additions & 4 deletions test/test_pathfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_pathfinder_outputs():

assert pathfinder.is_resampled

assert pathfinder.draws().shape == (draws, 3)
assert pathfinder.draws().shape == (draws, 4)


def test_pathfinder_from_csv():
Expand Down Expand Up @@ -159,7 +159,7 @@ def test_pathfinder_no_psis():
pathfinder = bern_model.pathfinder(data=jdata, psis_resample=False)

assert not pathfinder.is_resampled
assert pathfinder.draws().shape == (4000, 3)
assert pathfinder.draws().shape == (4000, 4)


def test_pathfinder_no_lp_calc():
Expand All @@ -170,7 +170,7 @@ def test_pathfinder_no_lp_calc():
pathfinder = bern_model.pathfinder(data=jdata, calculate_lp=False)

assert not pathfinder.is_resampled
assert pathfinder.draws().shape == (4000, 3)
assert pathfinder.draws().shape == (4000, 4)
n_lp_nan = np.sum(np.isnan(pathfinder.method_variables()['lp__']))
assert n_lp_nan < 4000 # some lp still calculated during pathfinder
assert n_lp_nan > 3000 # but most are not
Expand All @@ -190,4 +190,4 @@ def test_pathfinder_threads():
stan_file=stan, cpp_options={'STAN_THREADS': True}, force_compile=True
)
pathfinder = bern_model.pathfinder(data=jdata, num_threads=4)
assert pathfinder.draws().shape == (1000, 3)
assert pathfinder.draws().shape == (1000, 4)
Loading