Skip to content

Commit 77f0505

Browse files
committed
python: simplify API
1 parent 1636178 commit 77f0505

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

python/main.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2014-2019, CNRS
3-
* Copyright 2018-2021, INRIA
3+
* Copyright 2018-2022, INRIA
44
*/
55

66
#include "eigenpy/eigenpy.hpp"
@@ -48,12 +48,8 @@ BOOST_PYTHON_MODULE(eigenpy_pywrap)
4848
using namespace Eigen;
4949

5050
bp::def("is_approx",(bool (*)(const Eigen::MatrixBase<MatrixXd> &, const Eigen::MatrixBase<MatrixXd> &, const double &))&is_approx<MatrixXd,MatrixXd>,
51-
bp::args("A","B","prec"),
51+
(bp::arg("A"),bp::arg("B"),bp::arg("prec") = 1e-12),
5252
"Returns True if A is approximately equal to B, within the precision determined by prec.");
53-
54-
bp::def("is_approx",(bool (*)(const Eigen::MatrixBase<MatrixXd> &, const Eigen::MatrixBase<MatrixXd> &))&is_approx<MatrixXd,MatrixXd>,
55-
bp::args("A","B"),
56-
"Returns True if A is approximately equal to B.");
5753
}
5854

5955
exposeDecompositions();

0 commit comments

Comments
 (0)