Skip to content

Commit

Permalink
Remove extraneous expose layer
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Jun 23, 2024
1 parent 968c7cb commit 53b36bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions NDTensors/src/tensor/tensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ function map_diag!(f::Function, exposed_t_dest::Exposed, exposed_t_src::Exposed)
end

map_diag(f::Function, t::Tensor) = map_diag(f, expose(t))
function map_diag(f::Function, t::Exposed)
t_dest = copy(t)
map_diag!(f, expose(t_dest), expose(t))
function map_diag(f::Function, exposed_t::Exposed)
t_dest = copy(exposed_t)
map_diag!(f, expose(t_dest), exposed_t)
return t_dest
end

Expand Down

0 comments on commit 53b36bb

Please sign in to comment.