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

Remove knowledge of the printer from the atoms file #448

Closed eric-wieser closed 4 years ago

eric-wieser commented 4 years ago

This fixes a bug where algebras constructed after calling Eprint would produce multivectors whose coefficients had name A__x\u001b[0m instead of just A__x:

In [1]: from galgebra.ga import Ga; from galgebra.printer import Eprint

In [2]: g, e1, e2 = Ga.build('e_1 e_2')

In [3]: g.mv('A', 'vector').get_coefs(1)[0].name
Out[3]: 'A__1'

In [4]: Eprint()
Out[4]: <galgebra.printer.Eprint at 0x2a5c74bd220>

In [7]: g, e1, e2 = Ga.build('e_1 e_2')

In [8]: g.mv('A', 'vector').get_coefs(1)[0].name
Out[8]: 'A__1\x1b[0m'
review-notebook-app[bot] commented 4 years ago

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB