[Cython] how to initialize my c array in a quick way?

zhen_qing_he_456 zhen_qing_he_456 at 163.com
Fri Nov 7 10:01:54 CET 2008


Hello:
     if in my fuction i declare a c array like: 
               cdef  int a[5]
     now if want to initialize my array a, i can do follow:
        a[0] = 1  
        a[1] = 10
           :
          :
        a[4] = 3
     the value to my array is not continuous. Is there a quicker way in Cython  to do it like in c:
           a[5] = {1,3,28,5,3}
     
2008-11-07 



zhen_qing_he_456 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/cython-dev/attachments/20081107/822eac4c/attachment.htm 


More information about the Cython-dev mailing list