[Numpy-discussion] Implementing hashing protocol for dtypes

David Cournapeau cournape at gmail.com
Wed Mar 11 16:06:39 EDT 2009


Hi,

I was looking at #936, to implement correctly the hashing protocol for
dtypes. Am I right to believe that tp_hash should recursively descend
fields for compound dtypes, and the hash value should depend on the
size/ndim/typenum/byteorder for each "atomic" dtype + fields name (and
titles) ? Contrary to comparison, we can't reuse the python C api,
since PyObject_Hash cannot be applied to the fields dict, right ?

cheers,

David



More information about the NumPy-Discussion mailing list