Open alashworth opened 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
The functions for the categorical distribution only accept a column vector, it would be great if it could accept also row vectors.
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.
real categorical_lpmf(ints y | vector theta) real categorical_logit_lpmf(ints y | vector beta) int categorical_rng(vector theta)
real categorical_lpmf(ints y | row_vector theta) real categorical_logit_lpmf(ints y | row_vector beta) int categorical_rng(row_vector theta)
v2.15.0
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