File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -807,6 +807,8 @@ struct PyModule final {
807807 cpp_inputs.push_back (EValue (py::cast<bool >(python_input)));
808808 } else if (py::isinstance<py::int_>(python_input)) {
809809 cpp_inputs.push_back (EValue (py::cast<int64_t >(python_input)));
810+ } else if (py::isinstance<py::float_>(python_input)) {
811+ cpp_inputs.push_back (EValue (py::cast<double >(python_input)));
810812 } else {
811813 throw std::runtime_error (
812814 " Unsupported python type " + type_str +
@@ -1135,6 +1137,8 @@ struct PyMethod final {
11351137 cpp_inputs.push_back (EValue (py::cast<bool >(python_input)));
11361138 } else if (py::isinstance<py::int_>(python_input)) {
11371139 cpp_inputs.push_back (EValue (py::cast<int64_t >(python_input)));
1140+ } else if (py::isinstance<py::float_>(python_input)) {
1141+ cpp_inputs.push_back (EValue (py::cast<double >(python_input)));
11381142 } else {
11391143 throw std::runtime_error (
11401144 " Unsupported python type " + type_str +
You can’t perform that action at this time.
0 commit comments