[Numpy-discussion] Implementing hashing protocol for dtypes

David Cournapeau cournape at gmail.com
Thu Mar 12 08:13:04 EDT 2009


On Thu, Mar 12, 2009 at 1:00 PM, Robert Kern <robert.kern at 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 work with the patch (for
example, two equivalent types now hash the same), only tested on Linux
so far. I am not sure I took into account every case: I am not
familiar with the PyArray_Descr API (this patch was a good excuse to
dive into this part of the code), and I also noticed a few
discrepancies with the doc (the fields struct member never seems to be
NULL, but set to None for builtin types).

cheers,

David



More information about the NumPy-Discussion mailing list