stan-dev / stanc3

The Stan transpiler (from Stan to C++ and beyond).
BSD 3-Clause "New" or "Revised" License
140 stars 44 forks source link

Expose function to_int for data arguments #1222

Closed WardBrian closed 2 years ago

WardBrian commented 2 years ago

Closes #1221

Submission Checklist

Release notes

New function to_int which can down cast reals and real arrays to ints. This is only permitted if the argument is data to avoid breaking autodiffability.

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)