c++ - Python swig-wrapped vector of vector of doubles appears as Tuple -
i have function in c++ returns vector<vector<double> > object. have wrapped python using swig. when call it, unable subsequently modify function's output using resize() or push_back() vector methods. when try this, error 'tuple' object has no attribute 'resize' or 'push_back'. swig transform vectors tuple objects when interact them in python? if that's case, assume output function in python immutable, problem. can pass object wrapped methods accept vector of vectors of doubles. can't mess using vector methods within python. explanation on why or ideas on work-arounds appreciated. here swig file reference. stl template lines towards end: /* solutioncombiner.i */ %module solutioncombiner %{ /* put header files here or function declarations below */ #include "coord.hpp" #include "materialdata.hpp" #include "failurecriterion.hpp" #include "quadpointdata.hpp"