[Cython] Type scope vs. runtime scope
Robert Bradshaw
robertwb at math.washington.edu
Tue Aug 5 04:36:39 CEST 2008
On Aug 3, 2008, at 7:05 PM, Greg Ewing wrote:
> Dag Sverre Seljebotn wrote:
>
>> cdef numpy.ndarray[numpy.int64, 2] = numpy.zeros([10, 10],
>> numpy.int64)
>>
>> This however creates an error:
>> 'int64' is not a constant, variable or function identifier
>
> You might like to look into how extension types are
> made to behave as both types and runtime values --
> this sounds like it might be something similar.
Yep, there could be a (dynamically created?) runtime object to
represent those types if used in an object context, and would be much
simper than the runtimectypes proposal. This may prevent catching
some errors though.
- Robert
More information about the Cython-dev
mailing list