Skip to content

Commit

Permalink
Merge pull request #37 from Nixtla/fix/users-reported-issues
Browse files Browse the repository at this point in the history
fix: issue with Date objects
  • Loading branch information
MMenchero authored Oct 18, 2024
2 parents 4baabe3 + 05bfff5 commit c2a132f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/nixtla_client_cross_validation.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ nixtla_client_cross_validation <- function(df, h=8, freq=NULL, id_col="unique_id
window_starts <- seq(0, sum(unlist(resp$sizes)) - 1, by = h)
cutoff_idxs <- rep(idxs[window_starts + 1] - 1, each = h)
cutoff_dates <- df$ds[unique(cutoff_idxs)]
cutoff <- unlist(lapply(cutoff_dates, function(i) {rep(i, times = h)}))
cutoff <- do.call(c, sapply(cutoff_dates, function(i) rep(i, times = h), simplify = FALSE))
cutoff <- as.POSIXct(cutoff)

dt <- data.frame(
Expand Down

0 comments on commit c2a132f

Please sign in to comment.