[Numpy-discussion] Re: dtype: hashing and cmp

Simon Burton simon at arrowtheory.com
Sun May 28 13:57:02 EDT 2006


On Sun, 28 May 2006 14:36:47 -0600
Travis Oliphant <oliphant.travis at ieee.org> wrote:

> Simon Burton wrote:
> > On Sun, 28 May 2006 14:33:37 -0500
> > Robert Kern <robert.kern at gmail.com> wrote:
> >
> >   
> >>> if array.dtype == numpy.Int32: ...
> >>>       
> >> numpy.int32
> >>     
> >
> >   
> > No that doesn't work.
> >
> >   
> 
> Yeah, the "canonical" types (e.g. int32, float64, etc) are actually 
> scalar objects.  The type objects themselves are dtype(int32).  I don't 
> think they are currently listed anywhere in Python (except there is one 
> for every canonical scalar object). 
...

Can we promote the numarray names: Int32 etc. to their dtype equivalents ?
I don't see why having Int32='l' is any more usefull that Int32=dtype('l'), and
the later works with cmp (and also is more helpful in the interactive interpreter).

Simon.

-- 
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 




More information about the NumPy-Discussion mailing list