Skip to content

Commit

Permalink
Merge pull request #3 from eddelbuettel/patch-1
Browse files Browse the repository at this point in the history
Update RcppArmadillo initialization
  • Loading branch information
chriscarmona authored Sep 9, 2022
2 parents b56b962 + c9a8899 commit ad70e5f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/get_latents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ arma::mat get_latents_cpp( arma::mat Y,
unsigned int cat_Yij;

// possible variable classes that are allowed
arma::vec var_type_all;
var_type_all << 1 << 2 << 3 << arma::endr;

arma::vec var_type_all({1, 2, 3});

// checking input consistency
if( var_type.n_rows != p ) {
throw std::range_error("The number of columns in Y have to be equal to the lenght of vector var_type");
Expand Down

0 comments on commit ad70e5f

Please sign in to comment.