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

feat: Add python binding files for Stack operator

parent d22f9e54
No related branches found
No related tags found
2 merge requests!279v0.4.0,!256Add a Stack operator
/********************************************************************************
* Copyright (c) 2024 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#include <pybind11/pybind11.h>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Stack.hpp"
#include "aidge/operator/OperatorTensor.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);
m.def("Stack", &stack, py::arg("max_elements"), py::arg("name") = "");
}
}
......@@ -77,6 +77,7 @@ void init_Softmax(py::module&);
void init_Split(py::module&);
void init_Sqrt(py::module&);
void init_Squeeze(py::module&);
void init_Stack(py::module&);
void init_Sub(py::module&);
void init_Tanh(py::module&);
void init_Transpose(py::module&);
......@@ -169,6 +170,7 @@ void init_Aidge(py::module& m) {
init_Split(m);
init_Sqrt(m);
init_Squeeze(m);
init_Stack(m);
init_Sub(m);
init_Tanh(m);
init_Transpose(m);
......
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