On Wed, Mar 16, 2011 at 01:18, Matthew Brett <matthew.br...@gmail.com> wrote:
> Hi,
>
> 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?

According to "git log hashdescr.c", nothing has changed in the
implementation of the hash function since Oct 31, before numpy 1.5.1
which also passes the second test. I'm not sure what would be causing
the difference in HEAD.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to