improve conversion of parameters from Python to C++ types