Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GradedAxes] Fix labelled_isequal namespace #1557

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions NDTensors/src/lib/GradedAxes/src/gradedunitrange.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ using BlockArrays:
using Compat: allequal
using FillArrays: Fill
using ..LabelledNumbers:
LabelledNumbers, LabelledInteger, LabelledUnitRange, label, labelled, unlabel
LabelledNumbers,
LabelledInteger,
LabelledUnitRange,
label,
labelled,
labelled_isequal,
unlabel

const AbstractGradedUnitRange{T<:LabelledInteger} = AbstractBlockedUnitRange{T}

Expand All @@ -42,7 +48,7 @@ end
struct NoLabel end
blocklabels(r::AbstractUnitRange) = Fill(NoLabel(), blocklength(r))

function labelled_isequal(a1::AbstractUnitRange, a2::AbstractUnitRange)
function LabelledNumbers.labelled_isequal(a1::AbstractUnitRange, a2::AbstractUnitRange)
return blockisequal(a1, a2) && (blocklabels(a1) == blocklabels(a2))
end

Expand Down
6 changes: 3 additions & 3 deletions NDTensors/src/lib/GradedAxes/test/test_basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ using BlockArrays:
blocklength,
blocklengths,
blocks
using NDTensors.GradedAxes:
GradedOneTo, GradedUnitRange, blocklabels, labelled_isequal, gradedrange
using NDTensors.LabelledNumbers: LabelledUnitRange, islabelled, label, labelled, unlabel
using NDTensors.GradedAxes: GradedOneTo, GradedUnitRange, blocklabels, gradedrange
using NDTensors.LabelledNumbers:
LabelledUnitRange, islabelled, label, labelled, labelled_isequal, unlabel
using Test: @test, @test_broken, @testset
@testset "GradedAxes basics" begin
for a in (
Expand Down
Loading