Vectors/arrays, interpolation, other things

This has been a long running issue – should we include functions that can safely be used with data but not parameters (typically because of gradient issues such as those arising at the cusps in the linear interpolation). Maybe even something that would be better posed within the scope of the new compiler.

Yet another possibility is to handle these situations in pedantic mode, by flagging whenever functions with discontinuous derivatives are operating on parameters.

3 Likes

Any update on this issue? I’m trying to do interpolation myself, and hampered by the lack of an int function.

Perhaps someone’s written an interpolation function as a Stan function, i.e. not a piece of the Stan language but just a function that people could paste into their Stan programs? Maybe that would help? I agree that it’s annoying to always have to write this thing by hand…