Skip to content

Commit

Permalink
use diagview over data
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Jun 13, 2024
1 parent 06d9503 commit 2140eb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NDTensors/src/tensor/tensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function diag(tensor::Tensor)
tensordiag = NDTensors.similar(
dense(typeof(tensor)), eltype(tensor), (diaglength(tensor),)
)
data(tensordiag) .= diagview(tensor)
diagview(tensordiag) .= diagview(tensor)
return tensordiag
end

Expand Down

0 comments on commit 2140eb4

Please sign in to comment.