Forked from
Eclipse Projects / aidge / aidge_core
1530 commits behind the upstream repository.
-
Maxence Naud authored
- [Add] Attributes: __str__(), __repr__() and dict() methods - [Add] GraphView: __repr__(), __len__() methods - [Add] Node: __repr__() method - [Add] Operator: __repr__() method and attr property - improve Tensor __str__ method if it is empty - change DataType to lower case for python
Maxence Naud authored- [Add] Attributes: __str__(), __repr__() and dict() methods - [Add] GraphView: __repr__(), __len__() methods - [Add] Node: __repr__() method - [Add] Operator: __repr__() method and attr property - improve Tensor __str__ method if it is empty - change DataType to lower case for python
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
pybind_Data.cpp 1.03 KiB
/********************************************************************************
* 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/Data.hpp"
namespace py = pybind11;
namespace Aidge {
void init_Data(py::module& m){
// TODO : extend with more values !
py::enum_<DataType>(m, "DataType")
.value("float64", DataType::Float64)
.value("float32", DataType::Float32)
.value("float16", DataType::Float16)
.value("int8", DataType::Int8)
.value("int32", DataType::Int32)
.value("int64", DataType::Int64)
.value("uint8", DataType::UInt8)
.value("uint32", DataType::UInt32)
.value("uint64", DataType::UInt64)
;
py::class_<Data, std::shared_ptr<Data>>(m,"Data");
}
}