alashworth / test-issue-import

0 stars 0 forks source link

categorical_* functions don't accept row_vectors (it would be good that they could) #144

Open alashworth opened 5 years ago

alashworth commented 5 years ago

Issue by bnicenboim Thursday Jun 01, 2017 at 06:48 GMT Originally opened as https://github.com/stan-dev/stan/issues/2318


Summary:

The functions for the categorical distribution only accept a column vector, it would be great if it could accept also row vectors.

Description:

I use the categorical distribution to go over a matrix N_obs x N_probabilities, so it's more natural for me to use row vectors than column vectors.

Current functions:

real categorical_lpmf(ints y | vector theta) real categorical_logit_lpmf(ints y | vector beta) int categorical_rng(vector theta)

Expected functions:

real categorical_lpmf(ints y | row_vector theta) real categorical_logit_lpmf(ints y | row_vector beta) int categorical_rng(row_vector theta)

Current Version:

v2.15.0