changeset 737:fb60b54e1041 dev

added warning for finite delta
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 14 Aug 2015 11:29:02 -0400
parents 967d244968a4
children 2472b4d59aea
files python/utils.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/python/utils.py	Wed Aug 12 08:26:59 2015 -0400
+++ b/python/utils.py	Fri Aug 14 11:29:02 2015 -0400
@@ -662,6 +662,8 @@
             import sys
             sys.exit()
         else:
+            if similarityFunc is None and metric is not None and not np.isinf(delta):
+                print('Warning: you are using a cdist metric and a finite delta, which will make probably computation slower than using the equivalent similarityFunc (since all pairwise distances will be computed by cdist).')
             self.similarityFunc = similarityFunc
             self.metric = metric
             self.epsilon = epsilon