[Numpy-discussion] hashing dtypes, new variation, old theme

Matthew Brett matthew.brett at gmail.com
Wed Mar 16 02:18:59 EDT 2011


Running the test suite for one of our libraries, there seems to have
been a recent breakage of the behavior of dtype hashing.

This script:

import numpy as np

data0 = np.arange(10)
data1 = data0 - 10

dt0 = data0.dtype
dt1 = data1.dtype

assert dt0 == dt1 # always passes
assert hash(dt0) == hash(dt1) # fails on latest

fails on the current latest-ish - aada93306  and passes on a stock 1.5.0.

Is this expected?

See you,


More information about the NumPy-Discussion mailing list