From 2140eb4457d2a9a66583674271106c2a57ce8238 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Thu, 13 Jun 2024 19:58:58 -0400 Subject: [PATCH] use diagview over data --- NDTensors/src/tensor/tensor.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NDTensors/src/tensor/tensor.jl b/NDTensors/src/tensor/tensor.jl index 16e90ad14b..cfc12bd728 100644 --- a/NDTensors/src/tensor/tensor.jl +++ b/NDTensors/src/tensor/tensor.jl @@ -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