Skip to content

Commit

Permalink
adapt to BlockArrays 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ogauthe committed Jun 18, 2024
1 parent 43c8b4d commit fb59499
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion NDTensors/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ AMDGPU = "0.9"
Accessors = "0.1.33"
Adapt = "3.7, 4"
ArrayLayouts = "1.4"
BlockArrays = "1"
BlockArrays = "1.1"
CUDA = "5"
Compat = "4.9"
cuTENSOR = "2"
Expand Down
5 changes: 1 addition & 4 deletions NDTensors/src/lib/GradedAxes/src/gradedunitrange.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ end

# == is just a range comparison that ignores labels. Need dedicated function to check equality.
function gradedisequal(a1::AbstractUnitRange, a2::AbstractUnitRange)
# TODO remove workaround once BlockArrays.blockisequal is generalized to Integer
blocka1 = BlockArrays.blockedrange(GradedAxes.unlabel.(BlockArrays.blocklengths(a1)))
blocka2 = BlockArrays.blockedrange(GradedAxes.unlabel.(BlockArrays.blocklengths(a2)))
return blockisequal(blocka1, blocka2) && (blocklabels(a1) == blocklabels(a2))
return blockisequal(a1, a2) && (blocklabels(a1) == blocklabels(a2))
end

# TODO: Use `TypeParameterAccessors`.
Expand Down

0 comments on commit fb59499

Please sign in to comment.