summaryrefslogtreecommitdiff
path: root/ot/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'ot/utils.py')
-rw-r--r--ot/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ot/utils.py b/ot/utils.py
index 8419c83..be839f8 100644
--- a/ot/utils.py
+++ b/ot/utils.py
@@ -186,7 +186,10 @@ def cost_normalization(C, norm=None):
C = np.log(1 + C)
elif norm == "loglog":
C = np.log1p(np.log1p(C))
-
+ else:
+ raise ValueError(f'Norm {norm} is not a valid option. '
+ f'Valid options are:\n'
+ f'median, max, log, loglog')
return C