Verified Commit 19f41401 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: add new signature for call_PyArray_New

parent ee3370b1
/*
* Copyright 2020-2021 INRIA
* Copyright 2020-2022 INRIA
*/
#ifndef __eigenpy_numpy_hpp__
......@@ -109,6 +109,11 @@ EIGENPY_DLLAPI PyObject* call_PyArray_New(PyTypeObject* py_type_ptr, int nd,
npy_intp* shape, int np_type,
void* data_ptr, int options);
EIGENPY_DLLAPI PyObject* call_PyArray_New(PyTypeObject* py_type_ptr, int nd,
npy_intp* shape, int np_type,
npy_intp const* strides,
void* data_ptr, int options);
EIGENPY_DLLAPI int call_PyArray_ObjectType(PyObject*, int);
EIGENPY_DLLAPI PyTypeObject* getPyArrayType();
......@@ -143,6 +148,14 @@ inline PyObject* call_PyArray_New(PyTypeObject* py_type_ptr, int nd,
options, NULL);
}
inline PyObject* call_PyArray_New(PyTypeObject* py_type_ptr, int nd,
npy_intp* shape, int np_type,
npy_intp const* strides, void* data_ptr,
int options) {
return PyArray_New(py_type_ptr, nd, shape, np_type, strides, data_ptr, 0,
options, NULL);
}
inline int call_PyArray_ObjectType(PyObject* obj, int val) {
return PyArray_ObjectType(obj, val);
}
......
/*
* Copyright 2020-2021 INRIA
* Copyright 2020-2022 INRIA
*/
#include "eigenpy/numpy.hpp"
......@@ -31,6 +31,13 @@ PyObject* call_PyArray_New(PyTypeObject* py_type_ptr, int nd, npy_intp* shape,
options, NULL);
}
PyObject* call_PyArray_New(PyTypeObject* py_type_ptr, int nd, npy_intp* shape,
int np_type, npy_intp const* strides, void* data_ptr,
int options) {
return PyArray_New(py_type_ptr, nd, shape, np_type, strides, data_ptr, 0,
options, NULL);
}
int call_PyArray_ObjectType(PyObject* obj, int val) {
return PyArray_ObjectType(obj, val);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment