Skip to content
Snippets Groups Projects
Commit dddb8ab3 authored by Jerome Hue's avatar Jerome Hue Committed by Olivier BICHLER
Browse files

chore: Add pybind documentation

parent 35e45eeb
No related branches found
No related tags found
2 merge requests!279v0.4.0,!256Add a Stack operator
......@@ -12,18 +12,30 @@
#include <pybind11/pybind11.h>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Stack.hpp"
#include "aidge/operator/OperatorTensor.hpp"
#include "aidge/operator/Stack.hpp"
namespace py = pybind11;
namespace Aidge {
void init_Stack(py::module& m) {
py::class_<StackOp, std::shared_ptr<StackOp>, OperatorTensor>(m, "StackOp", py::multiple_inheritance())
.def(py::init<const std::uint32_t>(), py::arg("max_elements"))
.def_static("get_inputs_name", &StackOp::getInputsName)
.def_static("get_outputs_name", &StackOp::getOutputsName)
.def_readonly_static("Type", &StackOp::s_type);
void init_Stack(py::module &m) {
py::class_<StackOp, std::shared_ptr<StackOp>, OperatorTensor>(
m,
"StackOp",
py::multiple_inheritance(),
R"mydelimiter(Initialize a Stack operator.)mydelimiter")
.def(py::init<const std::uint32_t>(), py::arg("max_elements"))
.def_static("get_inputs_name", &StackOp::getInputsName)
.def_static("get_outputs_name", &StackOp::getOutputsName)
.def_readonly_static("Type", &StackOp::s_type);
m.def("Stack", &stack, py::arg("max_elements"), py::arg("name") = "");
}
m.def("Stack",
&stack,
py::arg("max_elements"),
py::arg("name") = "",
R"mydelimiter(
Initialize a node containing a Stack operator.
:param max_elements : the maximum number of tensors to be stacked.
:param name: name of the node.
)mydelimiter");
}
} // namespace Aidge
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment