From 0fc741b206af21727acf06f311c806325652cd11 Mon Sep 17 00:00:00 2001 From: lukas leufen <l.leufen@fz-juelich.de> Date: Wed, 4 Mar 2020 13:30:40 +0100 Subject: [PATCH] adjusted test to dask format --- src/data_handling/bootstraps.py | 2 +- test/test_data_handling/test_bootstraps.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data_handling/bootstraps.py b/src/data_handling/bootstraps.py index 3c6c2c57..3e699502 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 c1edd7ca..9dd23893 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() -- GitLab