Skip to content

Instantly share code, notes, and snippets.

Avatar

Filippo Bovo FilippoBovo

View GitHub Profile
@dfm
dfm / _chi2.c
Created Aug 3, 2012
How to wrap C code in Python
View _chi2.c
#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.";