Closed max-de-rooij closed 4 months ago
@LilithHafner This seems like it's due to a conversion missing. Did you look into Bools? I would've assumed Bools would be something that auto-converts?
Almost nothing auto-converts in PythonCall, which is why we wrap all Python functions passed in with pyconvert. I imagine the issue is that we missed that wrapper on conditions.
Describe the bug 🐞
When trying callbacks using
diffeqpy
, I stumbled upon the issue that my condition cannot be evaluated on the solve call.Expected behavior
The expected behaviour is that the callback condition can be evaluated and that my solution will compute.
Minimal Reproducible Example 👇
Error & Stacktrace ⚠️
Additional context
When I modify my condition using
ode.seval()
, it does work, which made me think it had something to do with the condition in this case:Which works fine.