Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
class Namespace(object): | |
"""Mock for argparse's NameSpace | |
""" | |
def __init__(self, lst=None, flter=None): | |
super(Namespace, self).__init__() | |
self.filter = flter | |
self.lst = lst | |
def __repr__(self): | |
return 'Namespace(filter=self.filter, lst = self.lst)' |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.
The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy