Skip to content Skip to sidebar Skip to footer
Showing posts with the label Cython

Determine Whether A Python Function Is Already Implemented In C Extension

Suppose I have a Python program that runs slow- after profiliing and I have identified the bottlene… Read more Determine Whether A Python Function Is Already Implemented In C Extension

Cython Parallel Openmp For Black Scholes With Numpy Integrated, Serial Code 10m Options 3.5s, Parallel?

Here is the Black (Black Scholes less the dividend) option pricing model for options on futures wri… Read more Cython Parallel Openmp For Black Scholes With Numpy Integrated, Serial Code 10m Options 3.5s, Parallel?

Cython - Memoryview Of A Dynamic 2d C++array

The Goal: Get a Memoryview from a 2D C++ char array using Cython. A little background: I have a nat… Read more Cython - Memoryview Of A Dynamic 2d C++array

Importing Cython Function: Attributeerror: 'module' Object Has No Attribute 'fun'

I have written a small cython code that is #t3.pyx from libc.stdlib cimport atoi cdef int fun(char… Read more Importing Cython Function: Attributeerror: 'module' Object Has No Attribute 'fun'

Best Choice For Passing Float Arrays In Cython

Say there is a C++ class in which we would like to define a function to be called in python. On the… Read more Best Choice For Passing Float Arrays In Cython

How To Import Depending Cython Modules From Parent Folder In Python

Imagine the following folder structure: /project run.py /Helper Helper.pxd Helper.pyx … Read more How To Import Depending Cython Modules From Parent Folder In Python

Cython: Create Memoryview Without Numpy Array?

Since I found memory-views handy and fast, I try to avoid creating NumPy arrays in cython and work … Read more Cython: Create Memoryview Without Numpy Array?

Attempting To Build A Cython Extension To A Python Package, Not Creating Shared Object (.so) File

I have attempted to use the answer here to add the building of a cython extension into my package. … Read more Attempting To Build A Cython Extension To A Python Package, Not Creating Shared Object (.so) File

Serialize A Group Of Integers Using Cython

I saw this sample code from the Pyrobuf page for serializing an integer ~3 times faster than via st… Read more Serialize A Group Of Integers Using Cython

How To Call A Cython Cdef() Function That Contains As A Parameter A Function In Python?

I have a cdef function that has amongst its parameters a function. I am trying to generate a python… Read more How To Call A Cython Cdef() Function That Contains As A Parameter A Function In Python?

Hello World From Cython Wiki Not Working

I'm trying to follow this tutorial from Cython: http://docs.cython.org/docs/tutorial.html#the-b… Read more Hello World From Cython Wiki Not Working

Passing 3d Numpy Array From Cython To C++

I recently used cython to speedup an application, and now struggle with passing a 3D numpy array fr… Read more Passing 3d Numpy Array From Cython To C++

Efficient Matrix Operations In Cython With No Python Objects

I'm writing a function that I'd like to translate to C as much as possible using Cython. To… Read more Efficient Matrix Operations In Cython With No Python Objects

How To Deallocate A Typed Numpy Array? Is Setting Callback_free_data A Viable Option?

While using an open source Cython library I found a memory leak. The leak seems to come from a type… Read more How To Deallocate A Typed Numpy Array? Is Setting Callback_free_data A Viable Option?

Strange Segmentation Fault In Pyarray_simplenewfromdata

My question is similar 'in spirit' to Segmentation fault in PyArray_SimpleNewFromData I hav… Read more Strange Segmentation Fault In Pyarray_simplenewfromdata

Return A 2d Cython Pointer To Python Array

I am currently passing from Cython to C the following pointer of a pointer: #convert the input… Read more Return A 2d Cython Pointer To Python Array

Using Numpy.array In Cython

I want to rewrite a class in cython format and save it as demo.pyx. The input parameter for the cla… Read more Using Numpy.array In Cython

Cython Interfaced With C++: Segmentation Fault For Large Arrays

I am transferring my code from Python/C interfaced using ctypes to Python/C++ interfaced using Cyth… Read more Cython Interfaced With C++: Segmentation Fault For Large Arrays

How Can I Compile An Extension Using Cython?

I am trying to compile a simple cython extension from the example page here on my Windows 7 64-bit … Read more How Can I Compile An Extension Using Cython?

Python Setuptools: How Can I Install Package With Cython Submodules?

I have a python package named pytools. It contains a cython-based submodule nms. When I install the… Read more Python Setuptools: How Can I Install Package With Cython Submodules?