From e92b7075decc2b6b55a5b395768f733a577591ea Mon Sep 17 00:00:00 2001 From: "Mokhtar Z. Alaya" Date: Fri, 24 Jan 2020 01:39:26 +0100 Subject: add a warning for non installed Botteleneck module --- ot/bregman.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ot/bregman.py') diff --git a/ot/bregman.py b/ot/bregman.py index c304b5d..2707b7c 100644 --- a/ot/bregman.py +++ b/ot/bregman.py @@ -1877,7 +1877,8 @@ def screenkhorn(a, b, M, reg, ns_budget=None, nt_budget=None, uniform=False, res try: import bottleneck except ImportError: - print("Bottleneck module doesn't exist. Install it from https://pypi.org/project/Bottleneck/") + warnings.warn("Bottleneck module is not installed. Install it from https://pypi.org/project/Bottleneck/ for better performance.") + bottleneck = np a = np.asarray(a, dtype=np.float64) b = np.asarray(b, dtype=np.float64) -- cgit v1.2.3