[Numpy-discussion] dtype comparison and hashing - bug?

Matthew Brett matthew.brett at gmail.com
Wed Oct 20 04:08:20 EDT 2010


Hi,

I have just run into this oddness:

In [28]: dt1 = np.dtype('f4')

In [29]: dt1.str
Out[29]: '<f4'

In [30]: dt2 = dt1.newbyteorder('<')

In [31]: dt2.str
Out[31]: '<f4'

In [32]: dt1 == dt2
Out[32]: True

In [33]: hash(dt1) == hash(dt2)
Out[33]: False

This is the same as:

http://www.mail-archive.com/numpy-discussion@scipy.org/msg13299.html

My question was - does the team still agree this is a bug?  Can anyone
offer a pointer as to how it should be fixed?

Best,

Matthew



More information about the NumPy-Discussion mailing list