我在将 std 向量传递给 python 时遇到问题。
std::vector<TMVA::Interval*> parameterRanges;
parameterRanges.push_back(new TMVA::Interval(-10,10));
parameterRanges.push_back(new TMVA::Interval(0.1,10));
parameterRanges.push_back(new TMVA::Interval(0,2000));
我必须在 python 中做到这一点。不幸的是,我无法更改 Interval C++ 类。我可以在 python 中使用 std.vector,但只能使用 std.vector('double') 或 int,但不能使用对象类型。
你有什么主意吗?