pygae / galgebra

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

Mv.grades return None under some situations #516

Closed mammalwong closed 4 months ago

mammalwong commented 5 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 4 months ago

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