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
e71c4600
Verified
Commit
e71c4600
authored
Oct 18, 2018
by
Justin Carpentier
Browse files
conversion: rename PyMatrixType in NumpyType to reflect change
parent
0b3366f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/details.hpp
View file @
e71c4600
...
...
@@ -54,12 +54,12 @@ namespace eigenpy
namespace
bp
=
boost
::
python
;
struct
PyMatrix
Type
struct
Numpy
Type
{
static
PyMatrix
Type
&
getInstance
()
static
Numpy
Type
&
getInstance
()
{
static
PyMatrix
Type
instance
;
static
Numpy
Type
instance
;
return
instance
;
}
...
...
@@ -100,7 +100,7 @@ namespace eigenpy
}
protected:
PyMatrix
Type
()
Numpy
Type
()
{
pyModule
=
bp
::
import
(
"numpy"
);
...
...
@@ -208,7 +208,7 @@ namespace eigenpy
EigenObjectAllocator
<
MatType
>::
convert
(
mat
,
pyArray
);
return
PyMatrix
Type
::
getInstance
().
make
(
pyArray
).
ptr
();
return
Numpy
Type
::
getInstance
().
make
(
pyArray
).
ptr
();
}
};
...
...
src/eigenpy.cpp
View file @
e71c4600
...
...
@@ -25,14 +25,14 @@ namespace eigenpy
using
namespace
Eigen
;
Exception
::
registerException
();
bp
::
def
(
"setNumpyType"
,
&
PyMatrix
Type
::
setNumpyType
,
bp
::
def
(
"setNumpyType"
,
&
Numpy
Type
::
setNumpyType
,
bp
::
arg
(
"Numpy type (np.ndarray or np.matrix)"
),
"Change the type returned by the converters from an Eigen object."
);
bp
::
def
(
"switchToNumpyArray"
,
&
PyMatrix
Type
::
switchToNumpyArray
,
bp
::
def
(
"switchToNumpyArray"
,
&
Numpy
Type
::
switchToNumpyArray
,
"Set the conversion from Eigen::Matrix to numpy.ndarray."
);
bp
::
def
(
"switchToNumpyMatrix"
,
&
PyMatrix
Type
::
switchToNumpyMatrix
,
bp
::
def
(
"switchToNumpyMatrix"
,
&
Numpy
Type
::
switchToNumpyMatrix
,
"Set the conversion from Eigen::Matrix to numpy.matrix."
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
MatrixXd
);
...
...
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