File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,6 +68,23 @@ Note that the resulting hash value above is the same as in:
6868 >> > mh.intdigest()
6969 7851180100622203313
7070
71+ Buffer Protocol Support
72+ -----------------------
73+
74+ The methods in this module support Python `Buffer Protocol
75+ <https://docs.python.org/3/c-api/buffer.html> `__, which allows them to be used
76+ on any object that exports a buffer interface. Here is an example showing
77+ hashing of a 4D NumPy array:
78+
79+ .. code-block :: python
80+
81+ >> > import numpy as np
82+ >> > arr = np.zeros((256 , 256 , 4 ))
83+ >> > metrohash.metrohash64(arr)
84+ 12125832280816116063
85+
86+ Note that arrays need to be contiguous for this to work. To convert a
87+ non-contiguous array, use ``np.ascontiguousarray() `` method.
7188
7289Development
7390-----------
Original file line number Diff line number Diff line change 11attrs==21.3.0
2+ backcall==0.2.0
23Cython==0.29.26
4+ decorator==5.1.0
35distlib==0.3.4
46filelock==3.4.2
57iniconfig==1.1.1
6- -e git+https://github.com/escherba/python-metrohash@f44727818a7218a25bc319215a4ff461f1ca7f4b#egg=metrohash
8+ ipython==7.30.1
9+ jedi==0.18.1
10+ matplotlib-inline==0.1.3
11+ -e git+https://github.com/escherba/python-metrohash@d3f96245c18e7e3724b8e8c8c211ff5c524beed0#egg=metrohash
12+ numpy==1.21.5
713packaging==21.3
14+ parso==0.8.3
15+ pexpect==4.8.0
16+ pickleshare==0.7.5
817platformdirs==2.4.1
918pluggy==1.0.0
19+ prompt-toolkit==3.0.24
20+ ptyprocess==0.7.0
1021py==1.11.0
22+ Pygments==2.10.0
1123pyparsing==3.0.6
1224pytest==6.2.5
1325six==1.16.0
1426toml==0.10.2
27+ traitlets==5.1.1
1528virtualenv==20.11.0
29+ wcwidth==0.2.5
Original file line number Diff line number Diff line change 11cython
2+ numpy
23pytest
34setuptools
45virtualenv
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def is_pure(self):
7878 )
7979
8080
81- VERSION = '0.1.0'
81+ VERSION = '0.1.0.post0 '
8282URL = "https://github.com/escherba/python-metrohash"
8383
8484
You can’t perform that action at this time.
0 commit comments