Skip to content

Commit 9ba6e72

Browse files
committed
Indexing horror
1 parent 0c16631 commit 9ba6e72

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/linalg/factorizations.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ const BlockBlasMat{T <: MAK.BlasFloat} = BlockMatrix{T}
1010
function MatrixAlgebraKit.one!(A::BlockBlasMat)
1111
_one, _zero = one(eltype(A)), zero(eltype(A))
1212
A .= _zero
13-
diagview(A) .= _one
13+
n_blocks = blocksize(A)[1]
14+
# awful workaround to BlockArrays indexing interface
15+
for bi in 1:n_blocks
16+
A[Block(bi), Block(bi)] .= diagm(fill(_one, blocksizes(A)[bi, bi][1]))
17+
end
1418
return A
1519
end
1620

0 commit comments

Comments
 (0)