Skip to content

Instantly share code, notes, and snippets.

#include <Python.h>
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/arrayobject.h>
#include <iostream>
static PyObject* create_zero_array(PyObject* self, PyObject* args);
static PyMethodDef NpMethods[] = {
{"create_zero_array", create_zero_array, METH_VARARGS, "create zero array of specified size"},