Skip to content

Commit

Permalink
Fix copy-paste errors
Browse files Browse the repository at this point in the history
Co-authored-by: Immanuel Abdi <56730419+immanuelazn@users.noreply.github.com>
  • Loading branch information
bnprks and immanuelazn committed Jan 9, 2025
1 parent e0100cd commit 2fdecde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions r/R/matrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -1261,8 +1261,8 @@ setMethod("[", "RowBindMatrices", function(x, i, j, ...) {
if (!rlang::is_missing(i$subset)) {
rows <- vapply(x@matrix_list, nrow, integer(1))
local_i_offset <- cumsum(c(0, rows))
# Find the range of indices in j$subset that correspond to each matrix in x@matrix_list
local_i_range <- findInterval(cumsum(c(0, rows)), i$subset)
# Find the range of indices in i$subset that correspond to each matrix in x@matrix_list
local_i_range <- findInterval(local_i_offset, i$subset)
}

new_mats <- list()
Expand Down Expand Up @@ -1332,7 +1332,7 @@ setMethod("[", "ColBindMatrices", function(x, i, j, ...) {
cols <- vapply(x@matrix_list, ncol, integer(1))
local_j_offset <- cumsum(c(0, cols))
# Find the range of indices in j$subset that correspond to each matrix in x@matrix_list
local_j_range <- findInterval(cumsum(c(0, cols)), j$subset)
local_j_range <- findInterval(local_j_offset, j$subset)
}

new_mats <- list()
Expand Down

0 comments on commit 2fdecde

Please sign in to comment.