[Cython] CF based type inference

Stefan Behnel stefan_ml at behnel.de
Wed May 9 15:33:55 CEST 2012


mark florisson, 09.05.2012 15:18:
> On 9 May 2012 14:16, Vitja Makarov wrote:
>> from cython cimport typeof
>>
>> def foo(float[::1] a):
>>    b = a
>>    #del b
>>    print typeof(b)
>>    print typeof(a)
>>
>>
>> In this example `b` is inferred as 'Python object' and not
>> `float[::1]`, is that correct?
>>
> That's the current behaviour, but it would be better if it inferred a
> memoryview slice instead.

+1

Stefan


More information about the cython-devel mailing list