Skip to content

Commit

Permalink
Added m and n as TypeVars to fix stubgen when using Eigen::MatrixXd.
Browse files Browse the repository at this point in the history
  • Loading branch information
timohl committed Aug 31, 2024
1 parent 4d3fca4 commit 340f729
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/pybind/geometry/geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void pybind_geometry_classes_declarations(py::module &m) {
std::shared_ptr<Geometry2D>, Geometry>
geometry2d(m, "Geometry2D",
"The base geometry class for 2D geometries.");

m.attr("m") = py::module_::import("typing").attr("TypeVar")("m");
m.attr("n") = py::module_::import("typing").attr("TypeVar")("n");
}
void pybind_geometry_classes_definitions(py::module &m) {
// open3d.geometry functions
Expand Down
2 changes: 2 additions & 0 deletions cpp/pybind/pipelines/registration/feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ void pybind_feature_declarations(py::module &m_registration) {
py::class_<Feature, std::shared_ptr<Feature>> feature(
m_registration, "Feature",
"Class to store featrues for registration.");
m_registration.attr("m") = py::module_::import("typing").attr("TypeVar")("m");
m_registration.attr("n") = py::module_::import("typing").attr("TypeVar")("n");
}
void pybind_feature_definitions(py::module &m_registration) {
// open3d.registration.Feature
Expand Down

0 comments on commit 340f729

Please sign in to comment.