From 4ff979a65b4027500846d3d0a1ebdd34b346f732 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Fri, 1 Dec 2023 15:59:11 +0100 Subject: [PATCH] Fixed Python binding --- include/aidge/graph/GraphView.hpp | 5 ----- python_binding/graph/pybind_GraphView.cpp | 2 +- python_binding/operator/pybind_MetaOperatorDefs.cpp | 4 +--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/aidge/graph/GraphView.hpp b/include/aidge/graph/GraphView.hpp index 3b3f9fb6d..bf23ef9f0 100644 --- a/include/aidge/graph/GraphView.hpp +++ b/include/aidge/graph/GraphView.hpp @@ -405,11 +405,6 @@ public: */ static bool replace(const std::set<NodePtr>& oldNodes, const std::set<NodePtr>& newNodes); - /** - * @brief Replace a set of Nodes in every available GraphView with a new set of Nodes with ordered inputs/outputs in a GraphView if possible. - */ - static bool replace(const std::shared_ptr<GraphView>& oldNodes, const std::shared_ptr<GraphView>& newNodes); - /** * @brief Clone the GraphView with shared Operators. It is a new GraphView, with cloned Nodes, but the new Nodes refer to the same Operators as the original ones. * @return std::shared_ptr<GraphView> diff --git a/python_binding/graph/pybind_GraphView.cpp b/python_binding/graph/pybind_GraphView.cpp index 61392470a..195e2740b 100644 --- a/python_binding/graph/pybind_GraphView.cpp +++ b/python_binding/graph/pybind_GraphView.cpp @@ -56,7 +56,7 @@ void init_GraphView(py::module& m) { :type include_learnable_parameters: bool, optional )mydelimiter") - .def("add", (void (GraphView::*)(std::shared_ptr<GraphView>)) & GraphView::add, + .def("add", (bool (GraphView::*)(std::shared_ptr<GraphView>)) & GraphView::add, py::arg("other_graph"), R"mydelimiter( Include a GraphView to the current GraphView object. diff --git a/python_binding/operator/pybind_MetaOperatorDefs.cpp b/python_binding/operator/pybind_MetaOperatorDefs.cpp index 6df5a43f6..ef027af7d 100644 --- a/python_binding/operator/pybind_MetaOperatorDefs.cpp +++ b/python_binding/operator/pybind_MetaOperatorDefs.cpp @@ -127,9 +127,7 @@ void init_MetaOperatorDefs(py::module &m) { m.def("meta_operator", &MetaOperator, py::arg("type"), py::arg("graph"), - py::arg("name") = "", - py::arg("input_nodes") = std::vector<NodePtr>(), - py::arg("output_nodes") = std::vector<NodePtr>() + py::arg("name") = "" ); } -- GitLab