Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ Note that the resulting hash value above is the same as in:
>>> mh.intdigest()
7851180100622203313

Buffer Protocol Support
-----------------------

The methods in this module support Python `Buffer Protocol
<https://docs.python.org/3/c-api/buffer.html>`__, which allows them to be used
on any object that exports a buffer interface. Here is an example showing
hashing of a 4D NumPy array:

.. code-block:: python

>>> import numpy as np
>>> arr = np.zeros((256, 256, 4))
>>> metrohash.metrohash64(arr)
12125832280816116063

Note that arrays need to be contiguous for this to work. To convert a
non-contiguous array, use ``np.ascontiguousarray()`` method.

Development
-----------
Expand Down
16 changes: 15 additions & 1 deletion pip-freeze.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
attrs==21.3.0
backcall==0.2.0
Cython==0.29.26
decorator==5.1.0
distlib==0.3.4
filelock==3.4.2
iniconfig==1.1.1
-e git+https://github.com/escherba/python-metrohash@f44727818a7218a25bc319215a4ff461f1ca7f4b#egg=metrohash
ipython==7.30.1
jedi==0.18.1
matplotlib-inline==0.1.3
-e git+https://github.com/escherba/python-metrohash@d3f96245c18e7e3724b8e8c8c211ff5c524beed0#egg=metrohash
numpy==1.21.5
packaging==21.3
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
platformdirs==2.4.1
pluggy==1.0.0
prompt-toolkit==3.0.24
ptyprocess==0.7.0
py==1.11.0
Pygments==2.10.0
pyparsing==3.0.6
pytest==6.2.5
six==1.16.0
toml==0.10.2
traitlets==5.1.1
virtualenv==20.11.0
wcwidth==0.2.5
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cython
numpy
pytest
setuptools
virtualenv
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def is_pure(self):
)


VERSION = '0.1.0'
VERSION = '0.1.0.post0'
URL = "https://github.com/escherba/python-metrohash"


Expand Down
Loading