From b23fa1a98403260bd57db06ab21f87b1ccd1a833 Mon Sep 17 00:00:00 2001 From: elaude Date: Tue, 23 Apr 2024 17:18:47 +0200 Subject: [PATCH] Fix bug in NumpyDataset bootstrapping (#5) Thanks to @elaude for the contribution! --- pandora/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/dataset.py b/pandora/dataset.py index 77db4bd..f6570e1 100644 --- a/pandora/dataset.py +++ b/pandora/dataset.py @@ -1258,7 +1258,7 @@ def bootstrap(self, seed: Optional[int] = None) -> NumpyDataset: bootstrap_data = self.input_data[ :, np.random.choice(range(num_snps), size=num_snps) ] - return NumpyDataset(bootstrap_data, self.sample_ids, self.populations) + return NumpyDataset(bootstrap_data, self.sample_ids, self.populations, self._missing_value, bootstrap_data.dtype) def get_windows(self, n_windows: int = 100) -> List[NumpyDataset]: """Creates ``n_windows`` new ``NumpyDataset`` objects as overlapping sliding windows over self.