Skip to content

Commit

Permalink
Refactor findall in terms of setdiff
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Fishman <[email protected]>
  • Loading branch information
lkdvos and mtfishman authored Jan 14, 2025
1 parent f54c269 commit af4a595
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/abstractblocksparsearray/abstractblocksparsematrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ function _allocate_svd_output(A::AbstractBlockSparseMatrix, full::Bool, ::Algori

# fill in values for blocks that aren't present, pairing them in order of occurence
# this is a convention, which at least gives the expected results for blockdiagonal
emptyrows = findall((browIs), 1:bm)
emptycols = findall((bcolIs), 1:bn)
emptyrows = setdiff(1:bm, browIs)
emptycols = setdiff(1:bn, bcolIs)
for (row, col) in zip(emptyrows, emptycols)
slengths[col] = min(brows[row], bcols[col])
end

Check warning on line 50 in src/abstractblocksparsearray/abstractblocksparsematrix.jl

View check run for this annotation

Codecov / codecov/patch

src/abstractblocksparsearray/abstractblocksparsematrix.jl#L46-L50

Added lines #L46 - L50 were not covered by tests
Expand Down

0 comments on commit af4a595

Please sign in to comment.