diff --git a/src/python/python_bindings.cpp b/src/python/python_bindings.cpp index c661839f..574dd985 100644 --- a/src/python/python_bindings.cpp +++ b/src/python/python_bindings.cpp @@ -146,6 +146,9 @@ np::ndarray computeHeatMapColorsPython2(const bp::list& scores, float hue_low_sc return fromEigen(computeHeatMapColors(scores_v, hue_low_score, hue_high_score)); } +BOOST_PYTHON_FUNCTION_OVERLOADS(compute_heat_map_colors_python1_overloads, computeHeatMapColorsPython1, 2, 4) +BOOST_PYTHON_FUNCTION_OVERLOADS(compute_heat_map_colors_python2_overloads, computeHeatMapColorsPython2, 1, 3) + BOOST_PYTHON_MODULE(MODULE_NAME) { Py_Initialize(); @@ -295,8 +298,13 @@ BOOST_PYTHON_MODULE(MODULE_NAME) bp::def("load", &load); bp::def("calculateResults", &calculateResults); bp::def("normalizeScores", &normalizeScoresPython); - bp::def("computeHeatMapColors", &computeHeatMapColorsPython1); - bp::def("computeHeatMapColors", &computeHeatMapColorsPython2); + bp::def( + "computeHeatMapColors", &computeHeatMapColorsPython1, + compute_heat_map_colors_python1_overloads((bp::arg("results"), bp::arg("use_full_color_range"), + bp::arg("hue_low_score") = 270.0, bp::arg("hue_high_score") = 0.0))); + bp::def("computeHeatMapColors", &computeHeatMapColorsPython2, + compute_heat_map_colors_python2_overloads( + (bp::arg("scores"), bp::arg("hue_low_score") = 270.0, bp::arg("hue_high_score") = 0.0))); } // Register shared_ptrs