hajimes/mmh3

hash128 returns unsigned int

Closed this issue · 1 comments

I was using mmh3 as part of a project, and was getting invalid values when I tried to rescaled the hashes into the range [0, 1]. Turns out, mmh3.hash128 was returning unsigned integers, not signed integers as the documentation suggests.

I was using Python 3.6.2 and mmh3 2.4.

Hi,
I'm so sorry for responding this late. I located where the cause of bug is, but considering that it was there for many years, I'll change the documentation side and say that hash128 returns unsigned values, so that no one will need to modify his/her code by the next release. In addition, I plan to add a new argument to get a signed value if one really requires signed values. Thank you for reporting an error!