Skip to content

Commit

Permalink
Fix size of projected index on selectdim
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Sep 28, 2023
1 parent 3b15bce commit fc0cd69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Slicing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ See also: [`view`](@ref).
function Base.selectdim(path::EinExpr, index::Symbol, i)
path = deepcopy(path)

leave = Iterators.filter((index) head, Leaves(path)) |> first
for leave in Iterators.filter((index) head, Leaves(path))
leave.size[index] = length(i)
end

return path
end
Expand Down

0 comments on commit fc0cd69

Please sign in to comment.