Skip to content
Snippets Groups Projects
Verified Commit 94128d8a authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: fix signatures

parent 78efea55
No related branches found
No related tags found
No related merge requests found
......@@ -41,9 +41,9 @@ namespace eigenpy
enum { NPY_ARRAY_MEMORY_CONTIGUOUS = SimilarMatrixType::IsRowMajor ? NPY_ARRAY_CARRAY : NPY_ARRAY_FARRAY };
PyArrayObject * pyArray = (PyArrayObject*) call_PyArray_New(nd, shape,
NumpyEquivalentType<Scalar>::type_code,
mat.data(),
NPY_ARRAY_MEMORY_CONTIGUOUS | NPY_ARRAY_ALIGNED);
NumpyEquivalentType<Scalar>::type_code,
mat.data(),
NPY_ARRAY_MEMORY_CONTIGUOUS | NPY_ARRAY_ALIGNED);
return pyArray;
}
......@@ -69,9 +69,9 @@ namespace eigenpy
enum { NPY_ARRAY_MEMORY_CONTIGUOUS_RO = SimilarMatrixType::IsRowMajor ? NPY_ARRAY_CARRAY_RO : NPY_ARRAY_FARRAY_RO };
PyArrayObject * pyArray = (PyArrayObject*) call_PyArray_New(nd, shape,
NumpyEquivalentType<Scalar>::type_code,
const_cast<SimilarMatrixType &>(mat.derived()).data(),
NPY_ARRAY_MEMORY_CONTIGUOUS_RO | NPY_ARRAY_ALIGNED);
NumpyEquivalentType<Scalar>::type_code,
const_cast<SimilarMatrixType &>(mat.derived()).data(),
NPY_ARRAY_MEMORY_CONTIGUOUS_RO | NPY_ARRAY_ALIGNED);
return pyArray;
}
......
......@@ -35,9 +35,9 @@ namespace eigenpy
#if defined _WIN32 || defined __CYGWIN__
namespace eigenpy
{
EIGENPY_DLLEXPORT PyArrayObject* call_PyArray_SimpleNew(npy_intp nd, npy_intp * shape, NPY_TYPES np_type);
EIGENPY_DLLEXPORT PyObject* call_PyArray_SimpleNew(int nd, npy_intp * shape, NPY_TYPES np_type);
EIGENPY_DLLEXPORT PyArrayObject* call_PyArray_New(npy_intp nd, npy_intp * shape, NPY_TYPES np_type, void * data_ptr, npy_intp options);
EIGENPY_DLLEXPORT PyObject* call_PyArray_New(int nd, npy_intp * shape, NPY_TYPES np_type, void * data_ptr, npy_intp options);
EIGENPY_DLLEXPORT int call_PyArray_ObjectType(PyObject *, int);
}
......
......@@ -17,12 +17,12 @@ namespace eigenpy
#if defined _WIN32 || defined __CYGWIN__
PyArrayObject* call_PyArray_SimpleNew(npy_intp nd, npy_intp * shape, NPY_TYPES np_type)
PyObject* call_PyArray_SimpleNew(int nd, npy_intp * shape, NPY_TYPES np_type)
{
return PyArray_SimpleNew(nd,shape,np_type);
return (PyArrayObject*)PyArray_SimpleNew(nd,shape,np_type);
}
PyArrayObject* call_PyArray_New(npy_intp nd, npy_intp * shape, NPY_TYPES np_type, void * data_ptr, npy_intp options)
PyObject* call_PyArray_New(int nd, npy_intp * shape, NPY_TYPES np_type, void * data_ptr, npy_intp options)
{
return PyArray_New(&PyArray_Type,nd,shape,np_type,NULL,data_ptr,0,options,NULL);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment