Skip to content

Commit 5b2b36b

Browse files
authored
Merge pull request #5 from escherba/es/postfix
fix import
2 parents d3f9624 + 662b483 commit 5b2b36b

6 files changed

Lines changed: 263 additions & 335 deletions

File tree

README.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff 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

7289
Development
7390
-----------

pip-freeze.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
11
attrs==21.3.0
2+
backcall==0.2.0
23
Cython==0.29.26
4+
decorator==5.1.0
35
distlib==0.3.4
46
filelock==3.4.2
57
iniconfig==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
713
packaging==21.3
14+
parso==0.8.3
15+
pexpect==4.8.0
16+
pickleshare==0.7.5
817
platformdirs==2.4.1
918
pluggy==1.0.0
19+
prompt-toolkit==3.0.24
20+
ptyprocess==0.7.0
1021
py==1.11.0
22+
Pygments==2.10.0
1123
pyparsing==3.0.6
1224
pytest==6.2.5
1325
six==1.16.0
1426
toml==0.10.2
27+
traitlets==5.1.1
1528
virtualenv==20.11.0
29+
wcwidth==0.2.5

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cython
2+
numpy
23
pytest
34
setuptools
45
virtualenv

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def is_pure(self):
7878
)
7979

8080

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

8484

0 commit comments

Comments
 (0)