Cython is a superset of the Python language for quickly generating Python C extensions.
4,868 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Unanswered (my tags)
Can't access class @property from other @property in Cython
I'm learning Cython and ran into the following weird bug import cython cdef double MILES_PER_KILOMETER = 0.621371 cdef class Distance: cdef double distance, miles, meters, km def __cinit__(... cython
Jonathan
- 9,645
How to make a cython library available to my python program?
I am working on a legacy project which uses a cython library: engine.cpython-37m-x86_64-linux-gnu.so It is downloaded to my current working directory: engine.cpython-37m-x86_64-linux-gnu.so test.py ... python cython
marlon
- 4,303
Optimise cython speed in for loop
I am implementing a Cython script for speeding up the reading of np.loadtxt in Python. This process takes about 5 minutes to go through 7000 txt files with 12501 rows in it. With MATLAB, this takes ... python for-loop append cython
Andres
- 1
Cython multinomial distribution
What is the most efficient way to get a multinomial distribution (say for n=1 trial) in cython? For example, I have three probabilities p0=0.1, p1=0.2, p2=0.7 (which sum to 1) and want to have x to be ... python numpy random cython
black
- 951
Speedup cython via call by reference
I am writing a software library in C++, which is wrapped in Python via Cython. However, the Python-C++ librbary is approximately 100 times slower (10 sec vs. 0.6 sec) than implementing the same code ... python c++ cython pass-by-reference
Andreas Rupp
- 11
Using cython and gcc compiler [duplicate]
I'm having issues trying to get cython working with the gcc compiler. I want to use the gcc compiler because I've heard it's harder to get your code from the executable using pyinstaller. I'm on 64-... python windows gcc 64-bit cython
Jims313
- 1
How to speed up the following code using numba? Numba Warning: The size argument is not supported in the following functions
I really want to speed up the code below by Numba. But I notice that Numba does not support generate normal distribution with size like np.random.normal(size=(nprime, nprime)). Is there any ... python performance cython numba
Eciel
- 43
How to use cython to increase the performance of python that does not require much calculation? [closed]
From what I understand, cython should only make more computational python code faster. python cython
Paras Singh
- 1
How to Cythonize an Ansible module
Is it possible to have a Cythonized script as an Ansible custom module ? When i tried with .pyx or compiled .so, Ansible did not recognize them. Is there any specific restriction ? Otherwise how do i ... ansible cython cythonize
Vin pk
- 1
Cython C++ templates problems
This is my C++ code /** * A CSI data format converter * @tparam OutputValueType * @tparam InputValueType * @param inputArray * @return */ template<typename OutputValueType, typename ... cython
HerrTian
- 1
How to rewrite this function in Cython? [closed]
I can't get the logic in writing functions in cython, yet. def haversine_vector (arr_lon1, arr_lat1, arr_lon2, arr_lat2): arr_dlon = arr_lon1 - arr_lon2 arr_dlat = arr_lat1 - arr_lat2 ... python cython
DDR
- 417
ray in Cython error: The @ray.remote decorator must be applied to either a function or to a class
I apply ray with Cython. It shows an error: TypeError: The @ray.remote decorator must be applied to either a function or to a class. How to solve this problem? Thanks. The setup.py: from distutils.... python performance parallel-processing cython ray
Eciel
- 43
cython cimport from another pyx file
I have a project with the following structure: lst_viewer/ setup.py extensions/ instrument.pxd instrument.pyx read_events.pyx src/ lst_viewer/ ... cython
Eurydice
- 7,203
Joblib Parallel + Cython Slower [closed]
I want to speed up my code computed parallel by joblib and Cython. But when I increase the number of for loops, Cython + joblib is slower than joblib. I also imported numpy in Cython. What's the ... python performance parallel-processing cython joblib
Eciel
- 43
Error when splitting pyx file into pxd and pyx file
I would like to split a pyx file which contains the declaration and definition of a class hierarchy into a pxd and pyx file for further use in another cython module. Here is my pxd file (instrument.... cython
Eurydice
- 7,203
153050per page