cython
How to account for column-contiguous array when extending numpy with C
I have a C-function to normalize the rows of an array in log-space (this prevents numerical underflow).[详细]
2023-01-30 07:35 分类:问答Does Cython support the ternary style if statement (if ? then : else)?
I forget the technical term for the (if ? then : else) format in C/C++. Also, is this syntax supported in the Cython (a C variant of Python)?[详细]
2023-01-30 05:51 分类:问答Cython, C and Fortran
I would like to ask your help about calling fortran fun开发者_如何学Pythonction through C functions. These C functions will be used in python code through cython. Putting things together, I have this[详细]
2023-01-29 15:17 分类:问答ctypes, pyrex, swig, or cython for this problem?
I have about 20 simple C++ classes that represent various probability distributions.I would like to make these available in Python.What is the easiest way to do this?I don\'t mind having a program aut[详细]
2023-01-29 05:46 分类:问答Extending Numpy with C function
I am trying to speed up my Numpy code and decided that I wanted to implement one particular function where my code spent most of the time in C.[详细]
2023-01-27 12:59 分类:问答Error when using lambda function with Cython
I am trying to use Cython to speed up a piece of code.Cython is giving an error that reads \"Expected an identifier or literal\" when I use lambda functions.As far as I can tell, lambda functions are[详细]
2023-01-27 11:51 分类:问答How to remove python assertion when compiling in cython?
so, here is my problem: I code in python, but I need to improve performance in some part of my code that are too slow. A good(and easy) solution seems to be using cython; I tried it and got good resul[详细]
2023-01-27 06:17 分类:问答No speed gains from Cython
I am trying to define a function that contains an inner loop for simulating an integral. The problem is speed. Evaluating the function once can take up to 30 seconds on my machine. Since my ultimate[详细]
2023-01-27 05:00 分类:问答using cython to port modules to python 3.1
Is i开发者_开发技巧t possible to import arbitrary modules in cython, compile them to shared object files and then use them in python 3.1?[详细]
2023-01-27 02:18 分类:问答Possible optimization in cython: numpy array
The following is my Cython code for drawing from multivariate normal distribution. I am using loop because each time I have different density. (conLSigma is the Cholesky factor)[详细]
2023-01-26 17:29 分类:问答