Skip to content

Commit 55fbc05

Browse files
committed
changes per code review
1 parent 2aa1705 commit 55fbc05

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

test/test_generate_quantities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def test_no_xarray(self):
426426
with self.assertRaises(RuntimeError):
427427
bern_gqs.draws_xr()
428428

429-
def test_bug_455(self):
429+
def test_single_row_csv(self):
430430
stan = os.path.join(DATAFILES_PATH, 'bernoulli.stan')
431431
bern_model = CmdStanModel(stan_file=stan)
432432
jdata = os.path.join(DATAFILES_PATH, 'bernoulli.data.json')

test/test_optimize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def test_optimize_bad(self):
581581
data=no_data, seed=1239812093, inits=None, algorithm='BFGS'
582582
)
583583

584-
def test_bug_455(self):
584+
def test_single_row_csv(self):
585585
stan = os.path.join(DATAFILES_PATH, 'matrix_var.stan')
586586
model = CmdStanModel(stan_file=stan)
587587
mle = model.optimize()

test/test_sample.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,13 +1668,13 @@ def test_no_xarray(self):
16681668
with self.assertRaises(RuntimeError):
16691669
bern_fit.draws_xr()
16701670

1671-
def test_bug_455(self):
1671+
def test_single_row_csv(self):
16721672
stan = os.path.join(DATAFILES_PATH, 'matrix_var.stan')
1673-
bug_455_model = CmdStanModel(stan_file=stan)
1674-
bug_455_fit = bug_455_model.sample(iter_sampling=1, chains=1)
1675-
z_as_ndarray = bug_455_fit.stan_variable(var="z")
1673+
model = CmdStanModel(stan_file=stan)
1674+
fit = model.sample(iter_sampling=1, chains=1)
1675+
z_as_ndarray = fit.stan_variable(var="z")
16761676
self.assertEqual(z_as_ndarray.shape, (1, 4, 3)) # flattens chains
1677-
z_as_xr = bug_455_fit.draws_xr(vars="z")
1677+
z_as_xr = fit.draws_xr(vars="z")
16781678
self.assertEqual(z_as_xr.z.data.shape, (1, 1, 4, 3)) # keeps chains
16791679
for i in range(4):
16801680
for j in range(3):

test/test_variational.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def test_variational_eta_fail(self):
253253
)
254254
)
255255

256-
def test_bug_455(self):
256+
def test_single_row_csv(self):
257257
stan = os.path.join(DATAFILES_PATH, 'matrix_var.stan')
258258
model = CmdStanModel(stan_file=stan)
259259
vb_fit = model.variational()

0 commit comments

Comments
 (0)