Skip to content

Instantly share code, notes, and snippets.

View FilippoBovo's full-sized avatar

Filippo Bovo FilippoBovo

View GitHub Profile
@dfm
dfm / _chi2.c
Created August 3, 2012 13:41
How to wrap C code in Python
#include <Python.h>
#include <numpy/arrayobject.h>
#include "chi2.h"
/* Docstrings */
static char module_docstring[] =
"This module provides an interface for calculating chi-squared using C.";
static char chi2_docstring[] =
"Calculate the chi-squared of some data given a model.";