Function importPyListToVectorDouble(PyObject *, vector<double>&, const string&)

Function Documentation

bool importPyListToVectorDouble(PyObject *list_input, vector<double> &output, const string &err_msg)

Imports the provided input list to the output vector. Sets the Python error message and returns false if one of the list elements is not a float type.

Return
true if no error is thrown, false otherwise
Parameters
  • list_input: a Python list object to iterate over
  • output: the output vector of doubles to push to
  • err_msg: error message to through if an element is not of float type