Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 12th, 2012  |  syntax: None  |  size: 0.28 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Convert Python List to Vector<int> in Cython
  2. cdef pylist_to_handles(hs):
  3.     cdef vector[int] o_vect
  4.     for h in hs:
  5.         o_vect.push_back(h)
  6.     return o_vect
  7.        
  8. cdef object pylist_to_handles(hs):
  9.     ...
  10.     return <object>o_vect
  11.        
  12. cdef vector[int] pylist_to_handles(hs):