Skip to content

Commit e92b707

Browse files
Mokhtar Z. AlayaMokhtar Z. Alaya
authored andcommitted
add a warning for non installed Botteleneck module
1 parent bfde1ac commit e92b707

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ot/bregman.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,8 @@ def screenkhorn(a, b, M, reg, ns_budget=None, nt_budget=None, uniform=False, res
18771877
try:
18781878
import bottleneck
18791879
except ImportError:
1880-
print("Bottleneck module doesn't exist. Install it from https://pypi.org/project/Bottleneck/")
1880+
warnings.warn("Bottleneck module is not installed. Install it from https://pypi.org/project/Bottleneck/ for better performance.")
1881+
bottleneck = np
18811882

18821883
a = np.asarray(a, dtype=np.float64)
18831884
b = np.asarray(b, dtype=np.float64)

0 commit comments

Comments
 (0)