输出结果
代码实现
def hist_HanMing_similar01(lh, rh):
lh_array = np.array(lh)
print('lh_array.shape:',lh_array.shape)
assert len(lh) == len(rh)
return sum(1 - (0 if l == r else float(abs(l - r))/max(l, r)) for l, r in zip(lh, rh))/len(lh)
def hist_HanMing_similar01(lh, rh):
lh_array = np.array(lh)
print('lh_array.shape:',lh_array.shape)
assert len(lh) == len(rh)
return sum(1 - (0 if l == r else float(abs(l - r))/max(l, r)) for l, r in zip(lh, rh))/len(lh)