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

Matthew Brett matthew.brett@gmail....
Wed Mar 16 11:43:09 CDT 2011


Hi,

On Wed, Mar 16, 2011 at 9:21 AM, Robert Kern <robert.kern@gmail.com> wrote:
> On Wed, Mar 16, 2011 at 10:27, Charles R Harris
> <charlesr.harris@gmail.com> wrote:
>>
>> On Wed, Mar 16, 2011 at 8:56 AM, Charles R Harris
>> <charlesr.harris@gmail.com> wrote:
>>>
>>>
>>> On Wed, Mar 16, 2011 at 8:46 AM, Robert Kern <robert.kern@gmail.com>
>>> wrote:
>>>>
>>>> On Wed, Mar 16, 2011 at 01:18, Matthew Brett <matthew.brett@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.
>>>>
>>>
>>> The 1.5.1 branch was based on 1.5.x, not master.
>>>
>>
>> David's change isn't in 1.5.x, so apparently it wasn't backported.
>
> Hmm. It works just before and just after that change, so the problem
> is somewhere else.

I can git-bisect it later in the day, will do so unless it's become
clear in the meantime.

Thanks,

Matthew


More information about the NumPy-Discussion mailing list