Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
ogauthe committed Nov 6, 2024
1 parent d0c02bd commit 8e988c0
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion NDTensors/src/lib/GradedAxes/src/gradedunitrange.jl
Original file line number Diff line number Diff line change
@@ -250,7 +250,7 @@ function blockedunitrange_getindices(
# if they exist. This makes it so that
# `only(axes(a[indices])) isa `GradedUnitRange`
# if `a isa `GradedUnitRange`, for example.
return mortar(blocks, length.(blocks)) # LOOSE DUAL
return mortar(blocks, length.(blocks))
end

# The block labels of the corresponding slice.
7 changes: 4 additions & 3 deletions NDTensors/src/lib/GradedAxes/src/gradedunitrangedual.jl
Original file line number Diff line number Diff line change
@@ -67,8 +67,8 @@ function blockedunitrange_getindices(
)
v = mortar(map(b -> a[b], blocks(indices)))
# GradedOneTo appears in mortar
# flip arr axis to preserve dual information
# axes(arr) will appear in axes(view(::BlockSparseArray, [Block(1)[1:1]]))
# flip v axis to preserve dual information
# axes(v) will appear in axes(view(::BlockSparseArray, [Block(1)[1:1]]))
return flip_blockvector(v)
end

@@ -87,7 +87,8 @@ function blockedunitrange_getindices(

v = mortar(vblocks, length.(vblocks))
# GradedOneTo appears in mortar
# axes(arr) will appear in axes(view(::BlockSparseArray, [Block(1)[1:1]]))
# flip v axis to preserve dual information
# axes(v) will appear in axes(view(::BlockSparseArray, [Block(1)]))
return flip_blockvector(v)
end

0 comments on commit 8e988c0

Please sign in to comment.