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
23a6eea4
Verified
Commit
23a6eea4
authored
Jul 30, 2021
by
Justin Carpentier
Browse files
register: add helper method to retrieve the PyArray_Descr
parent
c693c335
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/register.hpp
View file @
23a6eea4
...
...
@@ -56,6 +56,20 @@ namespace eigenpy
}
}
template
<
typename
Scalar
>
static
PyArray_Descr
*
getPyArrayDescr
()
{
namespace
bp
=
boost
::
python
;
if
(
!
isNumpyNativeType
<
Scalar
>
())
{
return
getPyArrayDescr
(
getPyType
<
Scalar
>
());
}
else
{
return
call_PyArray_DescrFromType
(
NumpyEquivalentType
<
Scalar
>::
type_code
);
}
}
template
<
typename
Scalar
>
static
int
getTypeCode
()
{
...
...
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