(name2array)
return hashlib.sha1('|'.join('%s %s' for n, h in sorted([(name, hash_array(a)) for name, a in name2array]))).hexdigest()
Hashes a list of (name,array) tuples.
    The hash is invariant to permutations of the list.
Hashes a list of (name,array) tuples.
    The hash is invariant to permutations of the list.
Hashes a list of ( name array ) tuples . The hash is invariant to permutations of the list .
def _hash_name2array(name2array):
    '''
    Hashes a list of (name,array) tuples.
    The hash is invariant to permutations of the list.
    '''
    def hash_array(a):
        return '%.10f,%.10f,%d' % (np.mean(a), np.var(a), np.argmax(a))
    return hashlib.sha1('|'.join('%s %s' for n, h in sorted([(name, hash_array(a)) for name, a in name2array]))).hexdigest()
def _hash_name2array ( name2array ) : def hash_array ( a ) : return '%.10f,%.10f,%d' % ( np . mean ( a ) , np . var ( a ) , np . argmax ( a ) ) return hashlib . sha1 ( '|' . join ( '%s %s' for n , h in sorted ( [ ( name , hash_array ( a ) ) for name , a in name2array ] ) ) ) . hexdigest ( )