def hash(obj, hash_name='md5', coerce_mmap=False):
 if ('numpy' in sys.modules):
  hasher = NumpyHasher(hash_name=hash_name, coerce_mmap=coerce_mmap)
 else:
  hasher = Hasher(hash_name=hash_name)
 return hasher.hash(obj)

def hash ( obj , hash_name = 'md5' , coerce_mmap = False ) : if ( 'numpy' in sys . modules ) : hasher = NumpyHasher ( hash_name = hash_name , coerce_mmap = coerce_mmap ) else : hasher = Hasher ( hash_name = hash_name ) return hasher . hash ( obj )
returns an hash object of type md5 or sha1 .