[Numpy-discussion] Changed attributes .dtypedescr, .dtypechar, .dtypestr and .dtype

Francesc Altet faltet at carabos.com
Mon Jan 16 04:44:12 CST 2006


Hi Travis,

El ds 14 de 01 del 2006 a les 20:45 -0700, en/na Travis Oliphant va
escriure:
> 1) Replacing attributes that are now gone:
> 
>    .dtypechar --> .dtype.char
>    .dtypestr --> .dtype.str
>    .dtypedescr --> .dtype
> 
> 2) Changing old .dtype -> .dtype.type
> 
>     This is only necessary if you were using a.dtype as a *typeobject* 
> as in
>     issubclass(a.dtype, <some scalar type>)
> 
>     If you were using .dtype as a parameter to dtype= then that usage 
> will still work
>     great (in fact a little faster) because now .dtype returns a 
> "descriptor object"
> 
> 3) The dtypedescr constructor is now called dtype.
> 
> This change should have gone into the 0.9.2 release, but things got too 
> hectic with all the name changes.   I will quickly release 0.9.4 with 
> these changes unless I hear strong disagreements within the next few days.

Glad that you liked the suggestion :-).

BTW, if you are going to release 0.9.4 soon, do not forget to correct
this typo:

--- python.nobackup/numpy/trunk/numpy/core/numerictypes.py
2006-01-16 11:07:13.000000000 +0100
+++ /usr/lib/python2.4/site-packages/numpy/core/numerictypes.py
2006-01-16 11:59:28.000000000 +0100
@@ -167,7 +167,7 @@
                     typeDict[tmpstr] = typeobj
                     na_name = tmpstr
                 elif base == 'complex':
-                    na_num = '%s%d' % (base.capitalize(), bit/2)
+                    na_name = '%s%d' % (base.capitalize(), bit/2)
                 elif base == 'bool':
                     na_name = base.capitalize()
                     typeDict[na_name] = typeobj

Thanks,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"






More information about the Numpy-discussion mailing list