Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove knowledge of the printer from the atoms file #448

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Sep 1, 2020

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
Copy link

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

@eric-wieser eric-wieser force-pushed the encapsulate-eprint branch 2 times, most recently from fa43b1a to ae488a4 Compare September 1, 2020 15:58
@eric-wieser eric-wieser added bug component: printer string, latex, and ansi escape printing labels Sep 1, 2020
This fixes a bug where calling `Eprint` would result in multivectors whose coefficients had name `A__x\u001b[0m` instead of just `A__x`.
@eric-wieser eric-wieser marked this pull request as ready for review September 1, 2020 16:18
@utensil utensil merged commit 12662dc into pygae:master Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: printer string, latex, and ansi escape printing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants