From 14c0abbd4cc963e9d7119254d055e7b9af106099 Mon Sep 17 00:00:00 2001 From: Octave Perrin <operrin@lrtechnologies.fr> Date: Tue, 3 Dec 2024 14:33:08 +0100 Subject: [PATCH] update python bind --- include/aidge/graph/GraphView.hpp | 2 +- python_binding/graph/pybind_GraphView.cpp | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/aidge/graph/GraphView.hpp b/include/aidge/graph/GraphView.hpp index 5f5411a1f..cc9e8d1ab 100644 --- a/include/aidge/graph/GraphView.hpp +++ b/include/aidge/graph/GraphView.hpp @@ -133,7 +133,7 @@ public: * specified location. * @param string path: Path where the file should be put * @param bool verbose: If true give more informations in the console during the saving process - * @param bool showProducers: if true, shows additional informations + * @param bool showProducers: if true, shows the producers as well */ void save(const std::string& path, bool verbose = false, bool showProducers = true) const; diff --git a/python_binding/graph/pybind_GraphView.cpp b/python_binding/graph/pybind_GraphView.cpp index e3edce45b..6d7bfcf90 100644 --- a/python_binding/graph/pybind_GraphView.cpp +++ b/python_binding/graph/pybind_GraphView.cpp @@ -29,6 +29,10 @@ void init_GraphView(py::module& m) { :param path: save location :type path: str + :param verbose: If true give more informations in the console during the saving process + :type verbose: bool + :param show_producers: if true, shows the producer Nodes as well + :type show_producers: bool )mydelimiter") .def("inputs", (std::vector<std::pair<NodePtr, IOIndex_t>> (GraphView::*)() const) &GraphView::inputs, @@ -45,8 +49,8 @@ void init_GraphView(py::module& m) { R"mydelimiter( List outside output connections of the GraphView. The vector size is guaranteed to match the number of outputs of the GraphView. - If there is no connection to a given output, the corresponding sub-vector will be empty. + :return: A list containing the pairs Node, output indexes. :rtype: List[Node, int] )mydelimiter") @@ -137,6 +141,7 @@ void init_GraphView(py::module& m) { R"mydelimiter( Get set of output Nodes. + :return: the output Nodes of the Graph :rtype: list[Node] )mydelimiter") @@ -144,6 +149,7 @@ void init_GraphView(py::module& m) { R"mydelimiter( Get set of input Nodes. + :return: the input Nodes of the Graph :rtype: list[Node] )mydelimiter") @@ -227,9 +233,9 @@ void init_GraphView(py::module& m) { Replace the old set of Nodes with the new set of given Nodes if possible in every GraphView. :param old_nodes: Nodes actually connected in GraphViews. - :type old_nodes: Node + :type old_nodes: List[Node] :param new_nodes: Nodes with inner connections already taken care of. - :type new_nodes: Node + :type new_nodes: List[Node] :return: Whether any replacement has been made. :rtype: bool )mydelimiter") -- GitLab