Skip to content

Commit

Permalink
cleanup python binding
Browse files Browse the repository at this point in the history
Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
  • Loading branch information
amccaskey committed Nov 25, 2024
1 parent 4ff99eb commit b96ecbe
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions libs/solvers/python/bindings/solvers/py_solvers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,15 +501,7 @@ RuntimeError
mod.def(
"get_operator_pool",
[](const std::string &name, py::kwargs config) {
heterogeneous_map asCpp;
for (auto &[k, v] : config) {
std::string asStr = k.cast<std::string>();
if (py::isinstance<py::int_>(v))
asCpp.insert(asStr, v.cast<std::size_t>());
if (py::isinstance<py::list>(v))
asCpp.insert(asStr, v.cast<std::vector<double>>());
}
return operator_pool::get(name)->generate(asCpp);
return operator_pool::get(name)->generate(hetMapFromKwargs(config));
},
R"#(Get and generate an operator pool based on the specified name and configuration.
Expand Down

0 comments on commit b96ecbe

Please sign in to comment.