From 6eede029acf7e2448e762b8d44e5c8fe2bcda319 Mon Sep 17 00:00:00 2001 From: "marco.cerliani" Date: Thu, 23 Nov 2023 08:40:55 +0100 Subject: [PATCH] fixed nbb boostrapping --- setup.py | 2 +- tsmoothie/utils_func.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e6e5e27..11375ee 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ HERE = pathlib.Path(__file__).parent -VERSION = '1.0.4' +VERSION = '1.0.5' PACKAGE_NAME = 'tsmoothie' AUTHOR = 'Marco Cerliani' AUTHOR_EMAIL = 'cerlymarco@gmail.com' diff --git a/tsmoothie/utils_func.py b/tsmoothie/utils_func.py index 31b9164..eb969af 100644 --- a/tsmoothie/utils_func.py +++ b/tsmoothie/utils_func.py @@ -510,7 +510,8 @@ def _id_nb_bootstrap(n_obs, block_length): np.arange(0, n_obs, block_length) ).reshape(-1, 1) - _id = (blocks + nexts).ravel()[:n_obs] + _id = (blocks + nexts).ravel() + _id = _id[_id < n_obs] return _id