Skip to content

Commit

Permalink
Fix failed GitHub update
Browse files Browse the repository at this point in the history
  • Loading branch information
franzmohr committed Dec 13, 2023
1 parent b4627ee commit 1666b7f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/stochvol_ksc1998.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
// [[Rcpp::export]]
arma::mat stochvol_ksc1998(arma::mat y, arma::mat h, arma::vec sigma, arma::vec h_init, arma::vec constant) {

// if (y.has_nan()) {
// Rcpp::stop("Argument 'y' contains NAs.");
// }
if (y.has_nan()) {
Rcpp::stop("Argument 'y' contains NAs.");
}

// Components of the mixture model
arma::rowvec p_i(7), mu(7), sigma2(7);
Expand Down
12 changes: 6 additions & 6 deletions src/stochvol_ocsn2007.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@
// [[Rcpp::export]]
arma::mat stochvol_ocsn2007(arma::vec y, arma::vec h, double sigma, double h_init, double constant) {

// if (y.has_nan()) {
// Rcpp::stop("Argument 'y' contains NAs.");
// }
if (y.has_nan()) {
Rcpp::stop("Argument 'y' contains NAs.");
}

// Prepare series
y = log(arma::pow(y, 2) + constant);
arma::uword tt = y.n_elem;
// if (y.n_elem != h.n_elem) {
// Rcpp::stop("Arguments 'y' and 'h' do not have the same length.");
// }
if (y.n_elem != h.n_elem) {
Rcpp::stop("Arguments 'y' and 'h' do not have the same length.");
}

// Components of the mixture model
arma::rowvec p_i(10), mu(10), sigma2(10);
Expand Down

0 comments on commit 1666b7f

Please sign in to comment.