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

include refac

parents dece8212 0fc741b2
Branches
Tags
1 merge request!59Develop
Pipeline #31077 passed
......@@ -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)
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment