Hi, I just ran a simple test which I think would be of general interest. It's about types and what there names are in the numpy module (and how many different names there are for a given type !!) Cheers, Sebastian Haase (maybe there is a good place in the wiki for this !?) >>> N.csingle <type 'complex64scalar'> >>> N.cdouble <type 'complex128scalar'> >>> N.cfloat <type 'complex128scalar'>
and all together !! >>> for tt in N.ScalarType: ... l=[k for k,v in N.__dict__.iteritems() if v == tt] ... print len(l), tt, l ... 0 <type 'int'> [] 0 <type 'float'> [] 0 <type 'complex'> [] 0 <type 'long'> [] 0 <type 'bool'> [] 0 <type 'str'> [] 0 <type 'unicode'> [] 0 <type 'buffer'> [] 2 <type 'int64scalar'> ['longlong', 'int64'] 2 <type 'int16scalar'> ['int16', 'short'] 2 <type 'int32scalar'> ['int32', 'int_'] 2 <type 'uint32scalar'> ['uint', 'uint32'] 2 <type 'unicodescalar'> ['unicode_', 'unicode0'] 2 <type 'complex64scalar'> ['complex64', 'csingle'] 3 <type 'int32scalar'> ['intp', 'intc', 'int0'] 4 <type 'complex128scalar'> ['cfloat', 'complex_', 'cdouble', 'complex128'] 3 <type 'stringscalar'> ['string', 'str_', 'string0'] 3 <type 'float96scalar'> ['float96', 'longfloat', 'longdouble'] 2 <type 'uint16scalar'> ['ushort', 'uint16'] 2 <type 'objectscalar'> ['object0', 'object_'] 3 <type 'float64scalar'> ['double', 'float64', 'float_'] 2 <type 'int8scalar'> ['byte', 'int8'] 2 <type 'uint8scalar'> ['uint8', 'ubyte'] 2 <type 'boolscalar'> ['bool8', 'bool_'] 2 <type 'float32scalar'> ['float32', 'single'] 3 <type 'complex192scalar'> ['complex192', 'clongdouble', 'clongfloat'] 3 <type 'uint32scalar'> ['uintc', 'uint0', 'uintp'] 2 <type 'uint64scalar'> ['uint64', 'ulonglong'] 2 <type 'voidscalar'> ['void', 'void0'] ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion