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

Mv(coeffs, 'odd') is nonsensical #81

Closed
eric-wieser opened this issue Nov 27, 2019 · 2 comments · Fixed by #180
Closed

Mv(coeffs, 'odd') is nonsensical #81

eric-wieser opened this issue Nov 27, 2019 · 2 comments · Fixed by #180
Labels
Milestone

Comments

@eric-wieser
Copy link
Member

eric-wieser commented Nov 27, 2019

I believe the intent of 'odd' is for usage like:

>>> g, *a = Ga.build('e*1|2|3|4')
>>> g.mv('A', 'odd')
A__1*e_1 + A__2*e_2 + A__3*e_3 + A__4*e_4 + A__5*e_5 + A__123*e_1^e_2^e_3 + A__124*e_1^e_2^e_4 + A__125*e_1^e_2^e_5 + A__134*e_1^e_3^e_4 + A__135*e_1^e_3^e_5 + A__145*e_1^e_4^e_5 + A__234*e_2^e_3^e_4 + A__235*e_2^e_3^e_5 + A__245*e_2^e_4^e_5 + A__345*e_3^e_4^e_5 + A__12345*e_1^e_2^e_3^e_4^e_5

However, it can be also use as

>>> g, *a = Ga.build('e*1|2|3|4')
>>> g.mv([2], 'odd')
2*e_1 + 2*e_1^e_2^e_3 + 2*e_1^e_2^e_3^e_4^e_5
>>> g.mv([2, 3], 'odd')
ValueError: Too many coefficients

This doesn't seem remotely useful - I'd propose we deprecate or outright remove it. 'even' already forbids this usage.

eric-wieser added a commit to eric-wieser/galgebra that referenced this issue Nov 30, 2019
This eliminates some special-casing in _make_mv and _make_spinor

Note that to avoid making pygaegh-81 worse, we now need to expicitly only allow strings
eric-wieser added a commit to eric-wieser/galgebra that referenced this issue Nov 30, 2019
This eliminates some special-casing in _make_mv and _make_spinor

Note that to avoid making pygaegh-81 worse, we now need to expicitly only allow strings
eric-wieser added a commit to eric-wieser/galgebra that referenced this issue Nov 30, 2019
This eliminates some special-casing in _make_mv and _make_spinor

Note that to avoid making pygaegh-81 worse, we now need to expicitly only allow strings
utensil pushed a commit that referenced this issue Dec 1, 2019
This eliminates some special-casing in _make_mv and _make_spinor

Note that to avoid making gh-81 worse, we now need to expicitly only allow strings
@utensil utensil added this to the 0.4.5 milestone Dec 18, 2019
@utensil
Copy link
Member

utensil commented Dec 18, 2019

Is this fixed?

@eric-wieser
Copy link
Member Author

Not fixed, but easy to fix

eric-wieser added a commit to eric-wieser/galgebra that referenced this issue Dec 18, 2019
Closes pygaegh-81.

This makes this consistent with the `even` and `mv` constructors.
utensil pushed a commit that referenced this issue Dec 18, 2019
Closes gh-81.

This makes this consistent with the `even` and `mv` constructors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants