Skip to content

Commit a3c13c6

Browse files
committed
return fill for diagview uniformdiagtensor
1 parent 9f555bc commit a3c13c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

NDTensors/src/diag/diagtensor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function DiagonalArrays.diagview(T::NonuniformDiagTensor)
3636
end
3737

3838
function DiagonalArrays.diagview(T::UniformDiagTensor)
39-
return array(T)
39+
return fill(getdiagindex(T, 1), diaglength(T))
4040
end
4141

4242
## Should this go in dense.jl or here since its related to diag?

0 commit comments

Comments
 (0)