diff --git a/src/data_handling/bootstraps.py b/src/data_handling/bootstraps.py index 3c6c2c57f36bafd410987e721164ce2d52c98bfc..3e69950267f9c95ccc636e560a21731ade388432 100644 --- a/src/data_handling/bootstraps.py +++ b/src/data_handling/bootstraps.py @@ -176,7 +176,7 @@ class BootStraps(RunEnvironment): return False, max_nboot @staticmethod - def shuffle_single_variable(data: da.array, chunks) -> np.ndarray: + def shuffle_single_variable(data: da.array, chunks) -> da.core.Array: size = data.shape return da.random.choice(data.reshape(-1,), size=size, chunks=chunks) diff --git a/test/test_data_handling/test_bootstraps.py b/test/test_data_handling/test_bootstraps.py index c1edd7ca7f012ccdebc2c75119eb37c5bc56c125..9dd23893ef903bfbd0595a482dceb32724c3b437 100644 --- a/test/test_data_handling/test_bootstraps.py +++ b/test/test_data_handling/test_bootstraps.py @@ -54,7 +54,7 @@ class TestBootstraps: def test_shuffle_single_variale(self, boot_no_init): data = np.array([[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]) - res = boot_no_init.shuffle_single_variable(data) + res = boot_no_init.shuffle_single_variable(data, chunks=(2, 3)).compute() assert res.shape == data.shape assert res.max() == data.max() assert res.min() == data.min()