You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expose_functions fails for cmdstan models where at least one user-defined function either returns a tuple or takes a tuple as argument.
It would be perfect if we could for instance use R lists as the interface to Stan tuples, such that
functions that return a tuple return a list when called from R,
functions that take a tuple as argument take a list as argument when called from R.
If this is not possible, then it would also be very useful to be able to expose all other functions than those with tuple return/argument type (so that one can make utility functions returning tuples / taking tuples as arguments, while still being able to expose all other functions).
This is fixed now by @andrjohns' PR #860 and I just checked that exposing the functions in the examples above works without error now. I'm going close this issue for now, but @adamgorm if you run into further trouble with this we can reopen the issue. Thanks for opening this.
Description
expose_functions
fails for cmdstan models where at least one user-defined function either returns a tuple or takes a tuple as argument.It would be perfect if we could for instance use R lists as the interface to Stan tuples, such that
If this is not possible, then it would also be very useful to be able to expose all other functions than those with tuple return/argument type (so that one can make utility functions returning tuples / taking tuples as arguments, while still being able to expose all other functions).
Reproducible examples
1: Fails
We can't expose a function that returns a tuple.
2: Fails
We can't expose a function that takes a tuple as argument.
3: Works
However, note that we can expose a function with a tuple in the function body.
The text was updated successfully, but these errors were encountered: