python-bloom-filter icon indicating copy to clipboard operation
python-bloom-filter copied to clipboard

Support For Different Data Types

Open 4gatepylon opened this issue 5 years ago • 1 comments

I've tried to use this for floating point numbers and got a type error on line 403 for "mask = 1 << bit_within_wordno". It would be nice to support different data types such as floats by simply using the numerical values of the bytes (or some other mapping function specified by users).

4gatepylon avatar May 08 '20 07:05 4gatepylon

Added PR for a minimal implementation of this that allows users to specify a key function that will map their key objects to something filterable of their choice.

4gatepylon avatar May 09 '20 21:05 4gatepylon