Update fingerprint.py

This commit is contained in:
Fabio Costa 2014-06-26 09:13:30 +01:00
parent 375189cf70
commit a97ab6d35c

View file

@ -5,6 +5,7 @@ from scipy.ndimage.filters import maximum_filter
from scipy.ndimage.morphology import (generate_binary_structure, from scipy.ndimage.morphology import (generate_binary_structure,
iterate_structure, binary_erosion) iterate_structure, binary_erosion)
import hashlib import hashlib
from operator import itemgetter
IDX_FREQ_I = 0 IDX_FREQ_I = 0
@ -97,7 +98,6 @@ def generate_hashes(peaks, fan_value=DEFAULT_FAN_VALUE):
""" """
fingerprinted = set() # to avoid rehashing same pairs fingerprinted = set() # to avoid rehashing same pairs
from operator import itemgetter
peaks.sort(key=itemgetter(1)) peaks.sort(key=itemgetter(1))
for i in range(len(peaks)): for i in range(len(peaks)):