zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#define Py_LIMITED_API 0x03060000
 
#include <Python.h>
#include <numpy/arrayobject.h>
#include <numpy/ufuncobject.h>
 
static PyModuleDef moduledef = {
    .m_base = PyModuleDef_HEAD_INIT,
    .m_name = "limited_api"
};
 
PyMODINIT_FUNC PyInit_limited_api(void)
{
    import_array();
    import_umath();
    return PyModule_Create(&moduledef);
}