Closed SteveBronder closed 2 years ago
I'd also like to have an addition that slightly changes the behavior of write_array such that if the user passes a vector that is longer than what is needed, the bottom N values are of the matrix are filled out. This allows for users of write_array to do things like
Is it possible to do this as two separate PRs? I think it's very difficult to review with them both happening at the same time
Actually @bob-carpenter @WardBrian yes I went through removed the second part of this. Now it's just the first part that fills in the NaN values. I'd like to do the second part (in particular for pathfinder) but can wait for a separate PR
Is your feature request related to a problem? Please describe.
I'd like to propose a fix for https://github.com/stan-dev/stan/issues/3114 that defaults the values of the vector we return from
write_array
toNaN
values. This is nice because parameters will always be filled in but ifwrite_array
throws an error anywhere then additional transformed parameters / generated quantities will just beNaN
I'd also like to have an addition that slightly changes the behavior of
write_array
such that if the user passes a vector that is longer than what is needed, the bottomN
values are of the matrix are filled out. This allows for users ofwrite_array
to do things likewhere currently we need to make a whole separate vector for the values such as the below.
Though this is tangential to the
NaN
filling and we can just do this in a separate PR. Now that I'm thinking about it maybe we should have a seperatewrite_array
that does this and the user can specify whether they want to write to the top or bottom of the array.