Skip to content

Commit 3462b27

Browse files
committed
fix: diag indices
1 parent 4aef348 commit 3462b27

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/stdlibs/LinearAlgebra.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ function LinearAlgebra.diag(x::AnyTracedRArray{T,2}, k::Integer=0) where {T}
279279
indices = stack((
280280
start_row:(start_row + diag_length - 1), start_col:(start_col + diag_length - 1)
281281
))
282+
indices .+= 1
282283

283284
# XXX: creating an empty array causes
284285
# terminate called after throwing an instance of 'xla::XlaRuntimeError'

0 commit comments

Comments
 (0)