[Numpy-discussion] Multiarray PEP

Francesc Altet faltet at carabos.com
Thu Feb 17 10:01:22 EST 2005


A Dijous 17 Febrer 2005 17:56, Peter Verveer va escriure:
> On 17 Feb 2005, at 17:53, Timo Korvola wrote:
> Agreed, I find them very useful for such cases. Normally I use the
> exact specifications, but I agree that the C based types should be
> around. Fortunately that should be easy to support.

Yes, I think so. Why not .type for Python types (and numarray
compatibility) and .typecode for C types (and Numeric compatibility)?.
numarray supports both right now without problems.

Besides, in numarray.records module, you may find the following map:

numfmt = {'i1':num.Int8,  'u1':num.UInt8,
          'i2':num.Int16, 'u2':num.UInt16,
          'i4':num.Int32, 'u4':num.UInt32,
          'i8':num.Int64, 'u8':num.UInt64,
          'f4':num.Float32, 'f8':num.Float64,
          'c8':num.Complex32, 'c16':num.Complex64,
          'b1':num.Bool}

which I find very useful and intuitive, but I guess it is incompatible
with current Numeric convention (that I find quite confusing, anyway).

Cheers,

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





More information about the NumPy-Discussion mailing list