alashworth / test-issue-import

0 stars 0 forks source link

promote int[] to real[] as argument for every function #42

Open alashworth opened 5 years ago

alashworth commented 5 years ago

Issue by bob-carpenter Wednesday Aug 06, 2014 at 20:51 GMT Originally opened as https://github.com/stan-dev/stan/issues/830


Make sure that all functions and distributions specifying real[] arguments also accept int[] arguments.

This should only be done where there is not a specialization for integers. mean(), for example, only has the signature (rea[]):real, and the promotion would allow signature (int[]):real --- the result is the same type because means of integers can be real. Similarly for the Dirichlet density dirichlet_log of signature (real[], real[]): real, which would accept int[] arguments (though only the size-1 int[] argument is an appropriate simplex for the first argument).

alashworth commented 5 years ago

Comment by syclik Wednesday Nov 30, 2016 at 15:46 GMT


I just updated the issue. We don't have too many functions to tackle.