chakravala / chakravala/Grassmann.jl

ERROR: LoadError: MethodError: no method matching parityrighthodge(::Int64, ::UInt64)

Open
#96 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
514
Forks
41
PR merge metrics
No merged PRs in 30d

Description

```julia
using Grassmann
function gram_schmidt(vectors)
# A = accumulate(∧, vectors; init = one(eltype(vectors)))
A = Chain{3}[vectors[1]]
for i in 2:length(vectors)
push!(A, A[i - 1] ∧ vectors[i])
end
println(A)
c = Chain{3}[vectors[1]]
for i in 2:length(vectors)
rev = reverse(A[i - 1])
println("rev: $rev, $(typeof(rev))")
println("ai: $(A[i]), $(typeof(A[i]))")
new_term = rev * A[i]
# push!(c, new_term)
end
c
end

function main()
n = 3
mvs = [rand(MultiVector{n})(1) for _ in 1:n]
ortho = gram_schmidt(mvs)
println(ortho)
end

main()

```

gives the following error:

```
ERROR: LoadError: MethodError: no method matching parityrighthodge(::Int64, ::UInt64)
Closest candidates are:
parityrighthodge(::SubManifold, ::Any) at ~/.julia/packages/DirectSum/44LUF/src/operations.jl:285
parityrighthodge(::SubManifold, ::Any, ::Any) at ~/.julia/packages/DirectSum/44LUF/src/operations.jl:285
parityrighthodge(::DiagonalForm, ::Any) at ~/.julia/packages/DirectSum/44LUF/src/operations.jl:285
...
Stacktrace:
[1] #s215#111
@ ~/.julia/packages/Grassmann/xDWIy/src/products.jl:536 [inlined]
[2] var"#s215#111"(V::Any, G::Any, T::Any, ::Any, b::Any)
@ Grassmann ./none:0
[3] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any})
@ Core ./boot.jl:580
[4] macro expansion
@ ~/.julia/packages/Grassmann/xDWIy/src/products.jl:475 [inlined]
[5] *(a::Chain{3, 2, Float64, 3}, b::Chain{3, 3, Float64, 1})
@ Grassmann ~/.julia/packages/Grassmann/xDWIy/src/products.jl:475
[6] gram_schmidt(vectors::Vector{Chain{3, 1, Float64, 3}})
@ Main ~/dev/seeugx.jl:15
[7] main()
@ Main ~/dev/seeugx.jl:24
[8] top-level scope
@ ~/dev/seeugx.jl:28
[9] include(fname::String)
@ Base.MainInclude ./client.jl:451
[10] top-level scope
@ REPL[105]:1
in expression starting at ~/dev/seeugx.jl:28
```

I have no idea how it got to parity issues.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the gram_schmidt reproduction in the issue and inspect Grassmann/src/products.jl around lines 475 and 536, where the failing multiplication appears in the stack trace. Compare the parityrighthodge candidates in DirectSum/src/operations.jl around line 285. Done means the shown multiplication no longer raises the MethodError and the reproduction completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.