Skip to content

Commit

Permalink
Add missing Python types for CFD
Browse files Browse the repository at this point in the history
  • Loading branch information
BUYT-1 authored and chernishev committed Apr 23, 2024
1 parent 24d5d46 commit 7e4da4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/python_bindings/py_util/get_py_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <Python.h>
#include <pybind11/stl/filesystem.h>

#include "algorithms/cfd/enums.h"
#include "algorithms/metric/enums.h"
#include "association_rules/ar_algorithm_enums.h"
#include "config/error_measure/type.h"
Expand Down Expand Up @@ -75,6 +76,7 @@ py::tuple GetPyType(std::type_index type_index) {
PyTypePair<algos::metric::MetricAlgo, kPyStr>,
PyTypePair<config::ErrorMeasureType, kPyStr>,
PyTypePair<algos::InputFormat, kPyStr>,
PyTypePair<algos::cfd::Substrategy, kPyStr>,
PyTypePair<std::vector<unsigned int>, kPyList, kPyInt>,
{typeid(config::InputTable),
[]() { return MakeTypeTuple(py::type::of<config::InputTable>()); }},
Expand Down
2 changes: 2 additions & 0 deletions src/python_bindings/py_util/py_to_any.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <pybind11/stl/filesystem.h>

#include "algorithms/algebraic_constraints/bin_operation_enum.h"
#include "algorithms/cfd/enums.h"
#include "algorithms/metric/enums.h"
#include "association_rules/ar_algorithm_enums.h"
#include "config/error_measure/type.h"
Expand Down Expand Up @@ -121,6 +122,7 @@ std::unordered_map<std::type_index, ConvFunc> const kConverters{
kEnumConvPair<algos::metric::MetricAlgo>,
kEnumConvPair<config::ErrorMeasureType>,
kEnumConvPair<algos::InputFormat>,
kEnumConvPair<algos::cfd::Substrategy>,
kCharEnumConvPair<algos::Binop>,
{typeid(config::InputTable), InputTableToAny},
{typeid(config::InputTables), InputTablesToAny},
Expand Down

0 comments on commit 7e4da4f

Please sign in to comment.