Skip to content

Instantly share code, notes, and snippets.

@jjlin18
jjlin18 / numpy_Capi
Created June 1, 2012 06:50
sample code for get and return numpy in C++
// From http://stackoverflow.com/questions/9128519/reading-many-values-from-numpy-c-api
/*
Make
g++ -o matrix_multiply.o -c matrix_multiply.cpp -I{python include file for numpy/noprefix.h} -I{python include} -fPIC -O2 -Wno-deprecated -Wno-write-strings
g++ -o matrix_multiply.so -shared matrix_multiply.o -L{boost lib path} -lz -lm -ldl -lpthread -boost_python
Python code:
import numpy
import matrix_multiply
@jjlin18
jjlin18 / some links
Created October 21, 2011 08:04
links from yl2011Oct