
May 28, 2006
12:51 a.m.
Is there a reason why dtype's are unhashable ? (ouch) On another point, is there a canonical list of dtype's ? I'd like to test the dtype of an array, and I always end up with something like this: if array.dtype == numpy.dtype('l'): ... When I would prefer to write something like: if array.dtype == numpy.Int32: ... (i can never remember these char codes !) Alternatively, should dtype's __cmp__ promote the other arg to a dtype before the compare ? I guess not, since that would break a lot of code: eg. dtype(None) is legal. Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com

6945
Age (days ago)
6945
Last active (days ago)
6 comments
3 participants
participants (3)
-
Robert Kern
-
Simon Burton
-
Travis Oliphant