-
Notifications
You must be signed in to change notification settings - Fork 252
Open
Description
Following is a strange behavior of nanobind that I would like to ask exaplanation why.
I bind such custom types:
#include "types_std.hpp"
NB_MODULE(_types_std, m) {
nb::bind_vector<std::vector<double>>(m, "VectorDouble");
nb::bind_vector<std::vector<int>>(m, "VectorInt");
nb::bind_vector<std::vector<bool>>(m, "VectorBool");
nb::bind_vector<std::vector<std::vector<int>>>(m, "VectorVectorInt");
nb::bind_vector<std::vector<compas::RowMatrixXd>>(m, "VectorRowMatrixXd");
nb::bind_vector<std::vector<std::tuple<int, float, float, float>>>(m, "VectorTupleIntFloatFloatFloat");
nb::bind_vector<std::vector<std::vector<std::tuple<int, float, float, float>>>>(m, "VectorVectorTupleIntFloatFloatFloat");
}
In python I load other nanobind submodules and install in another conda environment:
If I run an example from another project in my conda evironment this is most often not found:
from compas_libigl_types_std import VectorVectorInt # noqa: F401
The only solution is the following:
from compas_libigl import _types_std # noqa: F401 (edited)
Typically we get such error:
Metadata
Metadata
Assignees
Labels
No labels