Skip to content
Snippets Groups Projects
Commit 44a64216 authored by Maxence Naud's avatar Maxence Naud
Browse files

update DataType for python binding

parent cfdec01b
No related branches found
No related tags found
2 merge requests!152Update Aidge export to take a graph view has an argument instead of a...,!145Improve UI for Operator/Node/GraphView/Tensor
Pipeline #49447 failed
......@@ -22,9 +22,11 @@ void init_Data(py::module& m){
.value("float32", DataType::Float32)
.value("float16", DataType::Float16)
.value("int8", DataType::Int8)
.value("int16", DataType::Int16)
.value("int32", DataType::Int32)
.value("int64", DataType::Int64)
.value("uint8", DataType::UInt8)
.value("int8", DataType::Int8)
.value("uint16", DataType::UInt16)
.value("uint32", DataType::UInt32)
.value("uint64", DataType::UInt64)
;
......
......@@ -9,11 +9,10 @@
*
********************************************************************************/
#include <cstdint> // std::int64_t
#include <pybind11/pybind11.h>
#include <string>
#include <vector>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Shape.hpp"
#include "aidge/operator/OperatorTensor.hpp"
......@@ -21,14 +20,13 @@ namespace py = pybind11;
namespace Aidge {
void init_Shape(py::module& m) {
py::class_<Shape_Op, std::shared_ptr<Shape_Op>, Attributes, OperatorTensor>(m, "ShapeOp", py::multiple_inheritance())
.def(py::init<std::int64_t,
std::int64_t>(),
py::class_<Shape_Op, std::shared_ptr<Shape_Op>, OperatorTensor>(m, "ShapeOp", py::multiple_inheritance())
.def(py::init<const std::int64_t,
const std::int64_t>(),
py::arg("start"),
py::arg("end"))
.def_static("get_inputs_name", &Shape_Op::getInputsName)
.def_static("get_outputs_name", &Shape_Op::getOutputsName)
.def_static("attributes_name", &Shape_Op::staticGetAttrsName);
.def_static("get_outputs_name", &Shape_Op::getOutputsName);
declare_registrable<Shape_Op>(m, "ShapeOp");
......
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