pygae / galgebra

Symbolic Geometric Algebra/Calculus package for SymPy :crystal_ball:
https://galgebra.rtfd.io/
BSD 3-Clause "New" or "Revised" License
234 stars 62 forks source link

Mv.grades return None under some situations #516

Closed mammalwong closed 6 months ago

mammalwong commented 6 months ago

To reproduce the bug:

ga = Ga('e', g=[1,1,1], coords=S.symbols(f"0:3", real=True), wedge=False)
x,y,z = ga.mv()
a = ga.mv('A','mv')
print((a.grade(0)*x).grades)
print((a.grade(0)^x).grades)

It prints:

None
None

I found it occurs whenever a is created through ga.mv('A','mv'), and when I multiply a.grade(0) as the left side using * or ^, by any Mv instance as the right side, then the .grades always becomes None

utensil commented 6 months ago

Thank you, @mammalwong , the fix should be in master now as #510 is now merged.