9 if (_import_array() < 0) {
11 PyErr_SetString(PyExc_ImportError,
12 "numpy.core.multiarray failed to import");
17 return PyArray_TypeNumFromName(const_cast<char*>(type->tp_name));
20 #if defined _WIN32 || defined __CYGWIN__ 25 return PyArray_SimpleNew(nd, shape, np_type);
28 PyObject*
call_PyArray_New(PyTypeObject* py_type_ptr,
int nd, npy_intp* shape,
29 int np_type,
void* data_ptr,
int options) {
30 return PyArray_New(py_type_ptr, nd, shape, np_type, NULL, data_ptr, 0,
34 PyObject*
call_PyArray_New(PyTypeObject* py_type_ptr,
int nd, npy_intp* shape,
35 int np_type, npy_intp* strides,
void* data_ptr,
37 return PyArray_New(py_type_ptr, nd, shape, np_type, strides, data_ptr, 0,
42 return PyArray_ObjectType(obj, val);
48 return PyArray_DescrFromType(typenum);
52 PyArray_InitArrFuncs(funcs);
56 return PyArray_RegisterDataType(dtype);
60 return PyArray_MinScalarType(arr);
64 NPY_SCALARKIND scalar) {
65 return PyArray_RegisterCanCast(descr, totype, scalar);
69 PyArray_VectorUnaryFunc* castfunc) {
70 return PyArray_RegisterCastFunc(descr, totype, castfunc);
bool call_PyArray_Check(PyObject *py_obj)
void EIGENPY_DLLAPI import_numpy()
PyObject * call_PyArray_SimpleNew(int nd, npy_intp *shape, int np_type)
PyObject * call_PyArray_New(PyTypeObject *py_type_ptr, int nd, npy_intp *shape, int np_type, void *data_ptr, int options)
int call_PyArray_RegisterCastFunc(PyArray_Descr *descr, int totype, PyArray_VectorUnaryFunc *castfunc)
int call_PyArray_RegisterCanCast(PyArray_Descr *descr, int totype, NPY_SCALARKIND scalar)
PyArray_Descr * call_PyArray_MinScalarType(PyArrayObject *arr)
int call_PyArray_ObjectType(PyObject *obj, int val)
int call_PyArray_RegisterDataType(PyArray_Descr *dtype)
PyTypeObject * getPyArrayType()
PyArray_Descr * call_PyArray_DescrFromType(int typenum)
void call_PyArray_InitArrFuncs(PyArray_ArrFuncs *funcs)
int EIGENPY_DLLAPI PyArray_TypeNum(PyTypeObject *type)