Skip to content

Commit

Permalink
Fix bug in NumpyDataset bootstrapping (#5)
Browse files Browse the repository at this point in the history
Thanks to @elaude for the contribution!
  • Loading branch information
elaude authored Apr 23, 2024
1 parent ad4b6f5 commit b23fa1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandora/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b23fa1a

Please sign in to comment.