5 #ifndef __eigenpy_numpy_hpp__ 6 #define __eigenpy_numpy_hpp__ 10 #ifndef PY_ARRAY_UNIQUE_SYMBOL 11 #define PY_ARRAY_UNIQUE_SYMBOL EIGENPY_ARRAY_API 14 #include <numpy/numpyconfig.h> 15 #ifdef NPY_1_8_API_VERSION 16 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION 19 #include <numpy/noprefix.h> 20 #include <numpy/ufuncobject.h> 22 #if defined _WIN32 || defined __CYGWIN__ 23 #define EIGENPY_GET_PY_ARRAY_TYPE(array) \ 24 call_PyArray_MinScalarType(array)->type_num 26 #define EIGENPY_GET_PY_ARRAY_TYPE(array) \ 27 PyArray_MinScalarType(array)->type_num 36 #if defined _WIN32 || defined __CYGWIN__ 43 EIGENPY_DLLAPI PyObject*
call_PyArray_New(PyTypeObject * py_type_ptr,
int nd, npy_intp * shape,
int np_type,
void * data_ptr,
int options);
45 EIGENPY_DLLAPI
int call_PyArray_ObjectType(PyObject *,
int);
60 #define call_PyArray_Check(py_obj) PyArray_Check(py_obj) 61 #define call_PyArray_SimpleNew PyArray_SimpleNew 62 #define call_PyArray_New(py_type_ptr,nd,shape,np_type,data_ptr,options) \ 63 PyArray_New(py_type_ptr,nd,shape,np_type,NULL,data_ptr,0,options,NULL) 64 #define getPyArrayType() &PyArray_Type 65 #define call_PyArray_DescrFromType(typenum) PyArray_DescrFromType(typenum) 66 #define call_PyArray_MinScalarType(py_arr) PyArray_MinScalarType(py_arr) 67 #define call_PyArray_InitArrFuncs(funcs) PyArray_InitArrFuncs(funcs) 68 #define call_PyArray_RegisterDataType(dtype) PyArray_RegisterDataType(dtype) 69 #define call_PyArray_RegisterCanCast(descr,totype,scalar) PyArray_RegisterCanCast(descr,totype,scalar) 72 #endif // ifndef __eigenpy_numpy_hpp__ #define call_PyArray_RegisterDataType(dtype)
#define call_PyArray_DescrFromType(typenum)
#define call_PyArray_MinScalarType(py_arr)
#define call_PyArray_New(py_type_ptr, nd, shape, np_type, data_ptr, options)
void EIGENPY_DLLAPI import_numpy()
#define call_PyArray_InitArrFuncs(funcs)
#define call_PyArray_SimpleNew
#define call_PyArray_Check(py_obj)
#define call_PyArray_RegisterCanCast(descr, totype, scalar)
int EIGENPY_DLLAPI PyArray_TypeNum(PyTypeObject *type)