From 7aee63500c1897919741802890f90e88df494e28 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:03:13 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- unittest/python/test_std_vector.py | 2 +- unittest/vector.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/unittest/python/test_std_vector.py b/unittest/python/test_std_vector.py index 13c0edc8..1f68af2d 100644 --- a/unittest/python/test_std_vector.py +++ b/unittest/python/test_std_vector.py @@ -44,7 +44,7 @@ assert isinstance(l4_copy2, vector.StdVec_Mat3d) def checkZero(l): for x in l: - assert np.allclose(x, 0.), "x = {}".format(x) + assert np.allclose(x, 0.0), "x = {}".format(x) print("l1:") diff --git a/unittest/vector.cpp b/unittest/vector.cpp index 97201c68..56a24613 100644 --- a/unittest/vector.cpp +++ b/unittest/vector.cpp @@ -18,14 +18,13 @@ std::vector<MatType> copy(const std::vector<MatType> &Ms) { return out; } -template<typename MatType> +template <typename MatType> void setZero(std::vector<MatType> Ms) { for (std::size_t i = 0; i < Ms.size(); i++) { Ms[i].setZero(); } } - BOOST_PYTHON_MODULE(vector) { namespace bp = boost::python; using namespace eigenpy; @@ -38,8 +37,8 @@ BOOST_PYTHON_MODULE(vector) { bp::def("copyStdVector", copy<Eigen::MatrixXd>); bp::def("copyStdVector", copy<Eigen::VectorXd>); - StdVectorPythonVisitor<std::vector<Eigen::Matrix3d>>::expose( - "StdVec_Mat3d", "3D matrices."); + StdVectorPythonVisitor<std::vector<Eigen::Matrix3d>>::expose("StdVec_Mat3d", + "3D matrices."); bp::def("printVectorOf3x3", printVectorOfMatrix<Eigen::Matrix3d>); bp::def("copyStdVec_3x3", copy<Eigen::Matrix3d>, bp::args("mats")); -- GitLab