Skip to content

Commit

Permalink
fix: replaced real arrays with vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
demsarjure committed Sep 26, 2023
1 parent e0134d3 commit f62ed46
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions inst/stan/color.stan
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
data {
int<lower=0> n; // number of data entries
// rgb
array[n] real<lower=0,upper=255> r;
array[n] real<lower=0,upper=255> g;
array[n] real<lower=0,upper=255> b;
vector<lower=0,upper=255>[n] r;
vector<lower=0,upper=255>[n] g;
vector<lower=0,upper=255>[n] b;
// hsv
array[n] real<lower=0,upper=2*pi()> h;
array[n] real<lower=0,upper=1> s;
array[n] real<lower=0,upper=1> v;
vector<lower=0,upper=2*pi()>[n] h;
vector<lower=0,upper=1>[n] s;
vector<lower=0,upper=1>[n] v;

// priors
array[12] int<lower=0> p_ids;
array[24] real p_values;
vector[24] p_values;
}

parameters {
Expand Down
2 changes: 1 addition & 1 deletion inst/stan/linear.stan
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data {

// priors
array[6] int<lower=0> p_ids;
array[12] real p_values;
vector[12] p_values;
}

parameters {
Expand Down
2 changes: 1 addition & 1 deletion inst/stan/reaction_time.stan
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data {

// priors
array[6] int p_ids;
array[12] real p_values;
vector[12] p_values;
}

parameters {
Expand Down
4 changes: 2 additions & 2 deletions inst/stan/ttest.stan
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
data {
int<lower=0> n; // number of samples
array[n] real y;
vector[n] y;

// priors
array[3] int<lower=0> p_ids;
array[6] real p_values;
vector[6] p_values;
}

parameters {
Expand Down

0 comments on commit f62ed46

Please sign in to comment.