Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 7, 2024
1 parent 03c7593 commit b6cdb2a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
3 changes: 1 addition & 2 deletions include/eigenpy/angle-axis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ class AngleAxisVisitor : public bp::def_visitor<AngleAxisVisitor<AngleAxis> > {
bp::make_function((Vector3 & (AngleAxis::*)()) & AngleAxis::axis,
bp::return_internal_reference<>()),
&AngleAxisVisitor::setAxis, "The rotation axis.")
.add_property("angle",
(Scalar(AngleAxis::*)() const) & AngleAxis::angle,
.add_property("angle", (Scalar(AngleAxis::*)() const)&AngleAxis::angle,
&AngleAxisVisitor::setAngle, "The rotation angle.")

/* --- Methods --- */
Expand Down
5 changes: 3 additions & 2 deletions include/eigenpy/decompositions/LLT.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ struct LLTSolverVisitor
bp::args("self", "vector", "sigma"), bp::return_self<>())
#else
.def("rankUpdate",
(Solver(Solver::*)(const VectorXs &, const RealScalar &)) &
Solver::template rankUpdate<VectorXs>,
(Solver(Solver::*)(
const VectorXs &,
const RealScalar &))&Solver::template rankUpdate<VectorXs>,
bp::args("self", "vector", "sigma"))
#endif

Expand Down
5 changes: 2 additions & 3 deletions include/eigenpy/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@
EIGENPY_PRAGMA_WARNING(Deprecated : the_message)
#define EIGENPY_PRAGMA_DEPRECATED_HEADER(old_header, new_header) \
EIGENPY_PRAGMA_WARNING( \
Deprecated header file \
: #old_header has been replaced \
by #new_header.\n Please use #new_header instead of #old_header.)
Deprecated header file : #old_header has been replaced \
by #new_header.\n Please use #new_header instead of #old_header.)
#elif defined(WIN32)
#define EIGENPY_PRAGMA(x) __pragma(#x)
#define EIGENPY_PRAGMA_MESSAGE(the_message) \
Expand Down
4 changes: 2 additions & 2 deletions python/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ void exposeIsApprox() {

bp::def("is_approx",
(bool (*)(const Eigen::MatrixBase<MatrixXs> &,
const Eigen::MatrixBase<MatrixXs> &, const RealScalar &)) &
is_approx,
const Eigen::MatrixBase<MatrixXs> &,
const RealScalar &))&is_approx,
(bp::arg("A"), bp::arg("B"), bp::arg("prec") = dummy_precision),
"Returns True if A is approximately equal to B, within the "
"precision determined by prec.");
Expand Down
26 changes: 14 additions & 12 deletions unittest/complex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,19 @@ BOOST_PYTHON_MODULE(complex) {
bp::def("ascomplex",
ascomplex<long double, Eigen::Dynamic, Eigen::Dynamic, 0>);

bp::def("real", (MatrixXf(*)(const Eigen::MatrixBase<MatrixXcf> &)) &
real<MatrixXcf>);
bp::def("real", (MatrixXd(*)(const Eigen::MatrixBase<MatrixXcd> &)) &
real<MatrixXcd>);
bp::def("real", (MatrixXld(*)(const Eigen::MatrixBase<MatrixXcld> &)) &
real<MatrixXcld>);
bp::def("real",
(MatrixXf(*)(const Eigen::MatrixBase<MatrixXcf> &))&real<MatrixXcf>);
bp::def("real",
(MatrixXd(*)(const Eigen::MatrixBase<MatrixXcd> &))&real<MatrixXcd>);
bp::def(
"real",
(MatrixXld(*)(const Eigen::MatrixBase<MatrixXcld> &))&real<MatrixXcld>);

bp::def("imag", (MatrixXf(*)(const Eigen::MatrixBase<MatrixXcf> &)) &
imag<MatrixXcf>);
bp::def("imag", (MatrixXd(*)(const Eigen::MatrixBase<MatrixXcd> &)) &
imag<MatrixXcd>);
bp::def("imag", (MatrixXld(*)(const Eigen::MatrixBase<MatrixXcld> &)) &
imag<MatrixXcld>);
bp::def("imag",
(MatrixXf(*)(const Eigen::MatrixBase<MatrixXcf> &))&imag<MatrixXcf>);
bp::def("imag",
(MatrixXd(*)(const Eigen::MatrixBase<MatrixXcd> &))&imag<MatrixXcd>);
bp::def(
"imag",
(MatrixXld(*)(const Eigen::MatrixBase<MatrixXcld> &))&imag<MatrixXcld>);
}

0 comments on commit b6cdb2a

Please sign in to comment.