Skip to content

Commit

Permalink
chore: use numpy's AxisError from its exceptions module
Browse files Browse the repository at this point in the history
  • Loading branch information
elmomoilanen committed Aug 2, 2024
1 parent 7b8f586 commit 65c6124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap_sampling_distribution/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _test_statistic_validity(self, multid: bool) -> None:
# Quick and dirty validity test
try:
self.statistic(test_array)
except (np.AxisError, IndexError):
except (np.exceptions.AxisError, IndexError):
# Test resulted in one of accepted errors
# 1 dim: axis 1 is out of bounds for array of dimension 1
# multid: too many indices for array: array is 2-dimensional, but 3 were indexed
Expand Down

0 comments on commit 65c6124

Please sign in to comment.