Skip to content

Commit

Permalink
Improve types of error in scipy import
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Jul 31, 2024
1 parent 022279b commit d2bd73b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cfeintact/fisher_exact_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ def default_fisher_exact(*args, **kwargs):
try:
import scipy.stats as stats
fisher_exact = stats.fisher_exact
except Exception as e:
except ImportError as e:
logger.warning("Cannot import scipy: %s.", e)
fisher_exact = default_fisher_exact
except KeyboardInterrupt as e:
logger.warning("Cannot import scipy: %s.", e)
logger.warning("Cannot import scipy: %r.", e)
fisher_exact = default_fisher_exact

0 comments on commit d2bd73b

Please sign in to comment.