Replies: 1 comment
-
SolutionI fixed it!
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
New User
Hi, I'm a
Pybind11
user and I'm migrating my code tonanobind
.My Example
I have a C++ method exemplified below in which I have an optional
json
argument calledconfig
:So, after my
Pybind11
tonanobind
ajustments, my wrapper code is:Here below is my compile-time error:
Questions
Pybind11
can convertC++
nlohmann::json
type toPython
dict
type and vice versa. Is there any similar feature innanobind
to usejson/dict
data conversion?py::arg("config") = nb::dict()
orpy::arg("config") = nb::none()
, but does't work too. How can I set the optionaldict
parameter in this case?My System
Beta Was this translation helpful? Give feedback.
All reactions