Top "Cython" questions

Cython is a superset of the Python language for quickly generating Python C extensions.

Cython C-array initialization

I would like to do cdef int mom2calc[3] mom2calc[0] = 1 mom2calc[1] = 2 mom2calc[2] = 3 in a more compact way. …

cython
Cython setup.py for several .pyx

I would like to cythonize faster. Code for one .pyx is from distutils.core import setup from Cython.Build import …

python compilation installation cython setup.py
How do I wrap a C++ class with Cython?

I have a C++ class. It's made up of one .ccp file and one .h file. It compiles (I can …

c++ python python-2.7 cython
Cython Install GCC error

Trying to install Cython on a small VPS running Ubuntu Server. Did sudo apt-get install gcc and then python setup.…

python gcc installation cython
What is the recommended way of allocating memory for a typed memory view?

The Cython documentation on typed memory views list three ways of assigning to a typed memory view: from a raw …

python memory memory-management buffer cython
Using Cython with Django. Does it make sense?

Is it possible to optimize speed of a mission critical application developed in Django with Cython? Recently I have read …

python django cython
How to run .so files using through python script

I have a c program(.c file). I am converting that to a shared object(.so). How can i call …

python cython shared-objects
Fast hamming distance computation between binary numpy arrays

I have two numpy arrays of the same length that contain binary values import numpy as np a=np.array([1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0]) …

python arrays numpy cython hamming-distance
Cython in Ipython: ERROR: Cell magic `%%cython` not found

While using cython in ipython notebook, I see the error below. What's wrong? %load_ext cythonmagic /usr/local/lib/python2.7/…

ipython cython
Cython: (Why / When) Is it preferable to use Py_ssize_t for indexing?

This is a follow-up to this question. (Why / When) Is it preferable to use Py_ssize_t for indexing? In …

python numpy indexing cython unsigned-integer