Skip to content
Snippets Groups Projects
Commit 7aee6350 authored by pre-commit-ci[bot]'s avatar pre-commit-ci[bot] Committed by Wilson Jallet
Browse files

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
parent abc9fae9
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ assert isinstance(l4_copy2, vector.StdVec_Mat3d) ...@@ -44,7 +44,7 @@ assert isinstance(l4_copy2, vector.StdVec_Mat3d)
def checkZero(l): def checkZero(l):
for x in l: for x in l:
assert np.allclose(x, 0.), "x = {}".format(x) assert np.allclose(x, 0.0), "x = {}".format(x)
print("l1:") print("l1:")
......
...@@ -18,14 +18,13 @@ std::vector<MatType> copy(const std::vector<MatType> &Ms) { ...@@ -18,14 +18,13 @@ std::vector<MatType> copy(const std::vector<MatType> &Ms) {
return out; return out;
} }
template<typename MatType> template <typename MatType>
void setZero(std::vector<MatType> Ms) { void setZero(std::vector<MatType> Ms) {
for (std::size_t i = 0; i < Ms.size(); i++) { for (std::size_t i = 0; i < Ms.size(); i++) {
Ms[i].setZero(); Ms[i].setZero();
} }
} }
BOOST_PYTHON_MODULE(vector) { BOOST_PYTHON_MODULE(vector) {
namespace bp = boost::python; namespace bp = boost::python;
using namespace eigenpy; using namespace eigenpy;
...@@ -38,8 +37,8 @@ BOOST_PYTHON_MODULE(vector) { ...@@ -38,8 +37,8 @@ BOOST_PYTHON_MODULE(vector) {
bp::def("copyStdVector", copy<Eigen::MatrixXd>); bp::def("copyStdVector", copy<Eigen::MatrixXd>);
bp::def("copyStdVector", copy<Eigen::VectorXd>); bp::def("copyStdVector", copy<Eigen::VectorXd>);
StdVectorPythonVisitor<std::vector<Eigen::Matrix3d>>::expose( StdVectorPythonVisitor<std::vector<Eigen::Matrix3d>>::expose("StdVec_Mat3d",
"StdVec_Mat3d", "3D matrices."); "3D matrices.");
bp::def("printVectorOf3x3", printVectorOfMatrix<Eigen::Matrix3d>); bp::def("printVectorOf3x3", printVectorOfMatrix<Eigen::Matrix3d>);
bp::def("copyStdVec_3x3", copy<Eigen::Matrix3d>, bp::args("mats")); bp::def("copyStdVec_3x3", copy<Eigen::Matrix3d>, bp::args("mats"));
......
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