Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eigenpy
Commits
38ac962b
Verified
Commit
38ac962b
authored
Apr 18, 2020
by
Justin Carpentier
Browse files
core: add getPyArrayType from Python helper
This is needed for Windows
parent
261a8da2
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/numpy.hpp
View file @
38ac962b
...
...
@@ -40,11 +40,14 @@ namespace eigenpy
EIGENPY_DLLEXPORT
PyObject
*
call_PyArray_New
(
PyTypeObject
*
py_type_ptr
,
int
nd
,
npy_intp
*
shape
,
int
np_type
,
void
*
data_ptr
,
int
options
);
EIGENPY_DLLEXPORT
int
call_PyArray_ObjectType
(
PyObject
*
,
int
);
EIGENPY_DLLEXPORT
PyTypeObject
getPyArrayType
();
}
#else
#define call_PyArray_SimpleNew PyArray_SimpleNew
#define call_PyArray_New(py_type_ptr,nd,shape,np_type,data_ptr,options) \
PyArray_New(py_type_ptr,nd,shape,np_type,NULL,data_ptr,0,options,NULL)
#define getPyArrayType() PyArray_Type
#endif
#endif // ifndef __eigenpy_numpy_hpp__
src/numpy.cpp
View file @
38ac962b
...
...
@@ -32,5 +32,7 @@ namespace eigenpy
return
PyArray_ObjectType
(
obj
,
val
);
}
PyTypeObject
getPyArrayType
()
{
return
PyArray_Type
;
}
#endif
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment