Commit 041192db authored by aho's avatar aho
Browse files

Bugfix for improved Subset() that along cannot be NULL.

parent 776b5597
Pipeline #8512 passed with stage
in 44 minutes and 57 seconds
......@@ -2661,8 +2661,15 @@ Start <- function(..., # dim = indices/selectors,
selector_indices_to_take <- which(selector_file_dim_array == j, arr.ind = TRUE)[1, ]
names(selector_indices_to_take) <- names(selector_file_dims)
selector_store_position[names(selector_indices_to_take)] <- selector_indices_to_take
sub_array_of_selectors <- Subset(selector_array, names(selector_indices_to_take),
as.list(selector_indices_to_take), drop = 'selected')
#TODO: Check if the non-subset part makes sense. "selector_indices_to_take" is an array if
# "selector_file_dims" is not 1 (if selector is an array with a file_dim dimname, ie.,
# time = [sdate = 2, time = 4].
if (!is.null(names(selector_indices_to_take))) {
sub_array_of_selectors <- Subset(selector_array, names(selector_indices_to_take),
as.list(selector_indices_to_take), drop = 'selected')
} else {
sub_array_of_selectors <- selector_array
}
if (debug) {
if (inner_dim %in% dims_to_check) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment