From b7ad65bda0103ca1b6bb1a1072d1e6fb4b77574f Mon Sep 17 00:00:00 2001
From: bhalimi <benjamin.halimi@cea.fr>
Date: Fri, 17 Jan 2025 13:30:15 +0000
Subject: [PATCH] add pybind_Abs

---
 python_binding/operator/pybind_Abs.cpp | 31 ++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 python_binding/operator/pybind_Abs.cpp

diff --git a/python_binding/operator/pybind_Abs.cpp b/python_binding/operator/pybind_Abs.cpp
new file mode 100644
index 000000000..6c7cd6bae
--- /dev/null
+++ b/python_binding/operator/pybind_Abs.cpp
@@ -0,0 +1,31 @@
+/********************************************************************************
+ * Copyright (c) 2023 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/Abs.hpp"
+#include "aidge/operator/OperatorTensor.hpp"
+
+namespace py = pybind11;
+namespace Aidge {
+
+void init_Abs(py::module& m) {
+    py::class_<Abs_Op, std::shared_ptr<Abs_Op>, OperatorTensor>(m, "AbsOp", py::multiple_inheritance())
+    .def(py::init<>())
+    .def_static("get_inputs_name", &Abs_Op::getInputsName)
+    .def_static("get_outputs_name", &Abs_Op::getOutputsName)
+    .def_readonly_static("Type", &Abs_Op::Type);
+    declare_registrable<Abs_Op>(m, "AbsOp");
+
+    m.def("Abs", &Abs, py::arg("name") = "");
+}
+}  // namespace Aidge
-- 
GitLab