==== SimHash 溢出错误 ==== === 背景 === 在使用 [[https://github.com/wormtooth/DataClean-MNBVC|DataClean-MNBVC]] 清洗数据时,可能会遇到以下错误: ''fixed OverflowError: Python integer 256 out of bounds for uint8 problem'' === 结果 === 仓库中的 [[https://github.com/wormtooth/DataClean-MNBVC/blob/main/mnbvc/utils/simhash.py|simhash.py]] 依赖numpy==1.x.x。当使用numpy>=2.0.0时会触发此错误。请看文献1。当前的解决方案是使用numpy<2的版本。 === 文献 === 1. [[https://numpy.org/devdocs/numpy_2_0_migration_guide.html#changes-to-numpy-data-type-promotion|changes-to-numpy-data-type-promotion]]