void pySustAGELib::convertPyDictToSorted2DLandmarks(const boost::python::dict…
Jump to turn (9)
- 1void pySustAGELib::convertPyDictToSorted2DLandmarks(const boost::python::dict &p
- 2this throws an exception around the string creation
- 3does the pyTags assignment implicitly convert the keys to a python list?
- 4boost python has built in iterators, can you rewrite this so that iterators are
- 5can you make it friendlier for debugging, too?
- 6are more checks needed to see whether conversions are viable, or exceptions?
- 7can you compare boost::python and pybind11?
- 8how would this look if pybind11 was used instead, with it's mapping of standard
- 9since we're using pybind11, the py::dict and other parameters could be straight
- User
void pySustAGELib::convertPyDictToSorted2DLandmarks(const boost::python::dict &pySortedBodies2d, const boost::python::dict &pyImages, std::map > &outSortedBodiesCpp) { bpy::list pyTags = pySortedBodies2d.keys(); bpy::list pyValues = pySortedBodies2d.values();
for (int it = 0; it varTp; bpy::list pyVarTp(pyValues[it]); convertPyListTo2DLandmarks(pyVarTp, pyImages, varTp); std::string subjectName = bpy::extract(pyTags[it]); assert(subjectName!=""); outSortedBodiesCpp[subjectName] = varTp; }
}
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.