Skip to content

[GradedAxes] [BUG] Iterating over GradedUnitRange yields unexpected type change #1416

Closed
@ogauthe

Description

@ogauthe
using NDTensors.Sectors: U1
using NDTensors.GradedAxes: gradedrange

g1 = gradedrange([U1(0) => 2, U1(1)=>1])
for s in g1
    println(s, " ", typeof(s))
end

outputs

NDTensors.LabelledNumbers.LabelledInteger{Int64, U1{Int64}}(1, U(1)[0]) NDTensors.LabelledNumbers.LabelledInteger{Int64, U1{Int64}}
2 Int64
3 Int64

with a change in iterator type beyond the first element. One obtains the same result with s in eachindex(g1) (I guess they are the same internally)

Metadata

Metadata

Assignees

No one assigned

    Labels

    GradedAxesNDTensorsRequires changes to the NDTensors.jl library.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions