Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-13 Thread Stéfan van der Walt
2009/3/12 David Cournapeau courn...@gmail.com: Sorry, the link is http://codereview.appspot.com/26052/show I've tried the patch, and it works well! Bonus marks for all the useful comments and tests! I am +1. Cheers Stéfan ___ Numpy-discussion

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-12 Thread David Cournapeau
On Thu, Mar 12, 2009 at 9:13 PM, David Cournapeau courn...@gmail.com wrote: On Thu, Mar 12, 2009 at 1:00 PM, Robert Kern robert.k...@gmail.com wrote: It was an example. Ok, guess I will have to learn the difference between i.e. and e.g. one day. Anyway, here is a first shot at it:

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-12 Thread David Cournapeau
On Thu, Mar 12, 2009 at 1:00 PM, Robert Kern robert.k...@gmail.com wrote: It was an example. Ok, guess I will have to learn the difference between i.e. and e.g. one day. Anyway, here is a first shot at it: http://codereview.appspot.com/26052 I added a few tests which fail with trunk and

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-12 Thread Stéfan van der Walt
2009/3/12 David Cournapeau courn...@gmail.com: Anyway, here is a first shot at it: http://codereview.appspot.com/26052 Design question: should [('x', float), ('y', float)] and [('t', float), ('s', float)] hash to the same value or not? Regards Stéfan

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-12 Thread David Cournapeau
Stéfan van der Walt wrote: 2009/3/12 David Cournapeau courn...@gmail.com: Anyway, here is a first shot at it: http://codereview.appspot.com/26052 Design question: should [('x', float), ('y', float)] and [('t', float), ('s', float)] hash to the same value or not? According to:

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-11 Thread Robert Kern
On Wed, Mar 11, 2009 at 15:06, David Cournapeau courn...@gmail.com wrote: 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

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-11 Thread David Cournapeau
On Thu, Mar 12, 2009 at 5:36 AM, Robert Kern robert.k...@gmail.com wrote: On Wed, Mar 11, 2009 at 15:06, David Cournapeau courn...@gmail.com wrote: 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

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-11 Thread Robert Kern
On Wed, Mar 11, 2009 at 22:49, David Cournapeau courn...@gmail.com wrote: On Thu, Mar 12, 2009 at 5:36 AM, Robert Kern robert.k...@gmail.com wrote: On Wed, Mar 11, 2009 at 15:06, David Cournapeau courn...@gmail.com wrote: Hi, I was looking at #936, to implement correctly the hashing protocol