Skip to content

Commit

Permalink
Bump to 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimes committed Feb 23, 2021
1 parent acc0179 commit 1496b8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

mmh3 is a Python wrapper for [MurmurHash (MurmurHash3)](https://en.wikipedia.org/wiki/MurmurHash), a set of fast and robust non-cryptographic hash functions invented by Austin Appleby.

Combined with probabilistic techniques like a [Bloom filter](https://en.wikipedia.org/wiki/Bloom_filter), [MinHash](https://en.wikipedia.org/wiki/MinHash), and [feature hashing](https://en.wikipedia.org/wiki/Feature_hashing), mmh3 allows you to develop high-performance systems in fields such as data mining, machine learning, and natural language processing.

## How to use
Install:
```shell
Expand Down Expand Up @@ -64,7 +66,7 @@ Beware that `hash64` returns **two** values, because it uses the 128-bit version
```

## Changelog
### 3.0.0 (2021-02-22)
### 3.0.0 (2021-02-23)
* Python wheels are now available, thanks to the power of [cibuildwheel](https://github.com/joerick/cibuildwheel).
* Supported platforms are `manylinux1_x86_64`, `manylinux2010_x86_64`, `manylinux2014_aarch64`, `win32`, `win_amd64`, `macosx_10_9_x86_64`, and `macosx_11_0_arm64` (Apple Silicon).
* Add support for newer macOS environments. Thanks [Matthew Honnibal](https://github.com/honnibal)!
Expand Down Expand Up @@ -126,7 +128,7 @@ By default, mmh3 returns **signed** values for 32-bit and 64-bit versions and **
For compatibility with Google Guava (Java), see <https://stackoverflow.com/questions/29932956/murmur3-hash-different-result-between-python-and-java-implementation>

### Unexpected results when given non 32-bit seeds
Version 2.4 changed the type of seeds from signed 32-bit int to unsigned 32-bit int. (**The resulting values with signed seeds still remain the same as before, as long as they are 32-bit**)
Version 2.4 changed the type of seeds from signed 32-bit int to unsigned 32-bit int. The resulting values with signed seeds still remain the same as before, as long as they are 32-bit.

```shell
>>> mmh3.hash("aaaa", -1756908916) # signed representation for 0x9747b28c
Expand Down Expand Up @@ -159,7 +161,7 @@ Ported and modified for Python by Hajime Senuma.
The following textbooks and tutorials are great sources to learn how to use mmh3 (and other hash algorithms in general) for high-performance computing.

* Chapter 11: Using Less Ram in Micha Gorelick and Ian Ozsvald. 2014. *High Performance Python: Practical Performant Programming for Humans*. O'Reilly Media. [ISBN: 978-1-4493-6159-4](https://www.amazon.com/dp/1449361595).
* Duke University. [Efficient storage of data in memeory](http://people.duke.edu/~ccc14/sta-663-2016/20B_Big_Data_Structures.html).
* Duke University. [Efficient storage of data in memory](http://people.duke.edu/~ccc14/sta-663-2016/20B_Big_Data_Structures.html).
* Max Burstein. [Creating a Simple Bloom Filter](http://www.maxburstein.com/blog/creating-a-simple-bloom-filter/).
* Bugra Akyildiz. [A Gentle Introduction to Bloom Filter](https://www.kdnuggets.com/2016/08/gentle-introduction-bloom-filter.html).

Expand Down
4 changes: 2 additions & 2 deletions mmh3module.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------------
// MurmurHash3 was written by Austin Appleby, and is placed in the public
// domain. mmh3 Python module was written by Hajime Senuma,
// and is also placed in the public domain.
// and is also placed in the public domain/CC0 1.0.
// The authors hereby disclaim copyright to these source codes.

// To handle 64-bit data; see https://docs.python.org/2.7/c-api/arg.html
Expand Down Expand Up @@ -269,7 +269,7 @@ initmmh3(void)
if (module == NULL)
INITERROR;

PyModule_AddStringConstant(module, "__version__", "2.5.1");
PyModule_AddStringConstant(module, "__version__", "3.0.0");

struct module_state *st = GETSTATE(module);

Expand Down

0 comments on commit 1496b8f

Please sign in to comment.