Created
February 21, 2012 10:51
-
-
Save Jim-Holmstroem/1875766 to your computer and use it in GitHub Desktop.
Hash numpy.array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hashlib import sha1 | |
import numpy | |
arr=numpy.zeros((256,256,4)) | |
sha1(arr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, make sure your array is C-contigious, otherwise hashing will not work.
Simple fix: