Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cython vector operations

How can I use the remove function from <algorithm>? (Or any other operation, I want to use this with vectors, I tried to cdef extern to declare it, but there is no template function yet, I think)

like image 344
Patric Avatar asked Nov 28 '11 12:11

Patric


1 Answers

Cython can only reasonably link against compiled code in some external library following the C calling conventions. To use template functions, you'll have to write an extern "C" wrapper function that uses a specific incarnation of the algorithm (i.e. you have to fix the template parameters).

like image 120
Sven Marnach Avatar answered Oct 07 '22 04:10

Sven Marnach