Skip to content

Commit

Permalink
array necessary here because .= fails for CUDA gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Jun 14, 2024
1 parent dcf778e commit d8cb8bd
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),)
)
tensordiag .= diagview(tensor)
array(tensordiag) .= diagview(tensor)
return tensordiag
end

Expand Down

0 comments on commit d8cb8bd

Please sign in to comment.