SimHash 溢出错误

背景

在使用 DataClean-MNBVC 清洗数据时,可能会遇到以下错误:

fixed OverflowError: Python integer 256 out of bounds for uint8 problem

结果

仓库中的 simhash.py 依赖numpy==1.x.x。当使用numpy>=2.0.0时会触发此错误。请看文献1。当前的解决方案是使用numpy<2的版本。

文献

1. changes-to-numpy-data-type-promotion