mlr3temporal
mlr3temporal copied to clipboard
Trivial check in TaskForecast class?
Description
I am inspecting code for TaskForecast
class. In this part:
data = function(rows = NULL, cols = NULL, data_format = "data.table") {
data = super$data(rows, cols, data_format)
# Order data by date: FIXME: Should this happen here or in the backend.
date = self$date(rows)
assert_true(nrow(data) == nrow(data))
data[order(date), ]
},
it check if nrow(data) == nrow(data)
which doesn't make sense?
Maybe it is:
`nrow(data) == nrow(date)`
?
Reproducible example
data = function(rows = NULL, cols = NULL, data_format = "data.table") {
data = super$data(rows, cols, data_format)
# Order data by date: FIXME: Should this happen here or in the backend.
date = self$date(rows)
assert_true(nrow(data) == nrow(data))
data[order(date), ]
},