cython
How can a #defined C value be exposed to Python in a Cython module?
I\'d like to make the integer constants (ACTIVE_TAG, etc) defined here: //island management, m_activationState1[详细]
2023-02-27 03:49 分类:问答multi-platform gui app in C(P)ython or D
I really like D(2) language and would like to use it for multi-platform GUI application, but I see that its ecosystem is not quite developed. After moving from Linux to (Free)PC-BSD, I see there is ev[详细]
2023-02-26 20:49 分类:问答call Cython function from C++
I have a C++ library that has a Python wrapper (written with SWIG). This library allows executing small user-defined code (a callback), such as element-wise operations on a vector. I.e. instead of jus[详细]
2023-02-26 07:44 分类:问答How to initialize a struct from a dict in cython
Assuming I have a struct defined as such: cdef extern from \"blah.h\": struct my_struct: int a int b I need to be able to convert a dict into my_struct, without assuming any knowledge of my_struct\[详细]
2023-02-25 04:49 分类:问答Writing a Python wrapper for difficult C header file using Cython
A while back I wrote an thin wrapper around a commercial DAQ library using ctypes.Since then I\'ve come across Cython and wanted to give[详细]
2023-02-20 09:33 分类:问答How to declare a vector of pointers in Cython?
I want to declare something like that: cdef vector[Node*] list2node(list my_list): But Cyth开发者_如何转开发on gives me this error:[详细]
2023-02-18 20:44 分类:问答Efficient math ops on small arrays in python with cython
I use numpexpr for fast math on large arrays but if the size of the array is less than the CPU cache, writing my code in Cython using simple array math is way faster, especially, if the function is ca[详细]
2023-02-17 23:41 分类:问答memory usage of a probabilistic parser
I am writing a CKY parser for a Range Concatenation Grammar. I want to use a treebank as grammar, so the grammar will be large. I\'ve written a prototype 1 in Python and it seems to work well when I s[详细]
2023-02-17 23:32 分类:问答wrapping library functions with multiple outputs in cython
I\'m trying to wrap a dummy C libray using Cython. Here is the .h file of the library... void say_hello(char *name);[详细]
2023-02-17 22:24 分类:问答Cannot convert 'vector<unsigned long>' to Python object
I am trying to wrap a c++ function with signature vector < unsigned long > Optimized_Eratosthenes_sieve(unsigned long max)[详细]
2023-02-17 09:42 分类:问答