Skip to content

Commit 80c9b73

Browse files
committed
Add test case for conf_int(method='bca') with scaler input to ensure dimension.
1 parent 5a8367d commit 80c9b73

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

arch/tests/bootstrap/test_bootstrap.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,19 @@ def func(y):
457457
ci = ci.T
458458
assert_allclose(ci_db, ci)
459459

460+
def test_conf_int_bca_scaler(self):
461+
num_bootstrap = 100
462+
bs = IIDBootstrap(self.y)
463+
bs.seed(23456)
464+
465+
try:
466+
ci = bs.conf_int(np.mean, reps=num_bootstrap, method='bca')
467+
assert(ci.shape == (2, 1))
468+
except IndexError:
469+
pytest.fail('conf_int(method=\'bca\') scaler input regression. '
470+
'Ensure output is at least 1D with '
471+
'numpy.atleast_1d().')
472+
460473
def test_conf_int_parametric(self):
461474
def param_func(x, params=None, state=None):
462475
if state is not None:

0 commit comments

Comments
 (0)