[py3] use itervalues from six
authorSamuel Trégouët <samuel.tregouet@logilab.fr>
Thu, 16 Aug 2018 16:46:47 +0200
changeset 536 e4a5bd981a41
parent 534 69350ebf0370
child 538 98d6979ec07d
[py3] use itervalues from six
nazca/utils/minhashing.py
--- a/nazca/utils/minhashing.py	Thu Aug 16 15:53:01 2018 +0200
+++ b/nazca/utils/minhashing.py	Thu Aug 16 16:46:47 2018 +0200
@@ -16,6 +16,7 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 from __future__ import print_function
 
+from six import itervalues
 from six.moves import cPickle, xrange
 
 from random import randint
@@ -222,6 +223,6 @@
             buckets.clear()
             for i in xrange(sig.shape[1]):
                 buckets[tuple(sig[r:r+bandsize, i])].add(i)
-            similars.update(set(tuple(v) for v in buckets.itervalues()
+            similars.update(set(tuple(v) for v in itervalues(buckets)
                                 if len(v) >= minclustersize))
         return similars