Skip to content

Commit af4a595

Browse files
lkdvosmtfishman
andauthored
Refactor findall in terms of setdiff
Co-authored-by: Matt Fishman <[email protected]>
1 parent f54c269 commit af4a595

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/abstractblocksparsearray/abstractblocksparsematrix.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function _allocate_svd_output(A::AbstractBlockSparseMatrix, full::Bool, ::Algori
4343

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

0 commit comments

Comments
 (0)