[Numpy-discussion] Response to PEP suggestions

Rick White rlw at stsci.edu
Thu Feb 17 14:22:22 EST 2005


On Thu, 17 Feb 2005, David M. Cooke wrote:

> I come from a C background, so things like Float64, etc., look wrong.
> I think more in terms of single- and double-precision, so I think
> adding some more descriptive types:
>
> CInt         (would be either Int32 or Int64, depending on the platform)
> CFloat       (can't do Float, for backwards-compatibility reasons)
> CDouble      (could just be Double)
> CLong        (or Long)
> CLongLong    (or LongLong)
>
> That could make it easier to match types in Python code to types in C
> extensions.

Good choice of names.

> Oh, and the Python types int and float should be allowed (especially
> if you want this to go in the core!).

Say, I like that idea.  And maybe, like float and int, the numeric types
could be callable to construct numeric arrays of that type, e.g.,

a = numeric3.Int16([1,2,3])

- Rick





More information about the NumPy-Discussion mailing list