diff --git a/python_binding/graph/pybind_Node.cpp b/python_binding/graph/pybind_Node.cpp index c4525dce89cbe125b841447a99eddd4214017883..83f5688fa3d9e459a364ee3e74975a23d09c236c 100644 --- a/python_binding/graph/pybind_Node.cpp +++ b/python_binding/graph/pybind_Node.cpp @@ -66,7 +66,8 @@ void init_Node(py::module& m) { [](Node &self, std::shared_ptr<GraphView> other_graph, const IOIndex_t out_id=0, py::object other_in_id = py::none()) { std::pair<NodePtr, IOIndex_t> cpp_other_in_id; - // Note: default arg nullptr to allow python binding + // Note: PyBind on windows does not support conversion of nullptr -> std::shared_ptr, using this trampoline to change the default arg to a py::none(). If signature change, we would be able to directly bind the function. + if (other_in_id.is_none()) { cpp_other_in_id = std::pair<NodePtr, IOIndex_t>(nullptr, gk_IODefaultIndex); }else{