Skip to content
Snippets Groups Projects
Commit c6d4d753 authored by lukas leufen's avatar lukas leufen
Browse files

include refac

parents dece8212 0fc741b2
No related branches found
No related tags found
1 merge request!59Develop
Pipeline #31077 passed
...@@ -176,7 +176,7 @@ class BootStraps(RunEnvironment): ...@@ -176,7 +176,7 @@ class BootStraps(RunEnvironment):
return False, max_nboot return False, max_nboot
@staticmethod @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 size = data.shape
return da.random.choice(data.reshape(-1,), size=size, chunks=chunks) return da.random.choice(data.reshape(-1,), size=size, chunks=chunks)
......
...@@ -54,7 +54,7 @@ class TestBootstraps: ...@@ -54,7 +54,7 @@ class TestBootstraps:
def test_shuffle_single_variale(self, boot_no_init): def test_shuffle_single_variale(self, boot_no_init):
data = np.array([[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]) 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.shape == data.shape
assert res.max() == data.max() assert res.max() == data.max()
assert res.min() == data.min() assert res.min() == data.min()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment