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

Better product error messages when can't multiply #10960

Closed
kcrisman opened this issue Mar 18, 2011 · 3 comments
Closed

Better product error messages when can't multiply #10960

kcrisman opened this issue Mar 18, 2011 · 3 comments

Comments

@kcrisman
Copy link
Member

See #10683, where the following less-than-helpful message was discovered.

sage: k.<b> = FiniteField(9); k
Finite Field in b of size 3^2
sage: vector([1,i]).dot_product(vector(k,[1,b]))
---------------------------------------------------------
ArithmeticError: 

Of course you can't multiply elements of the symbolic ring and this finite field. But if this happened buried deep in some other code, it could take a long time to track down.

This actually happens when you just multiply as well, unsurprisingly, so that's where it would have to be caught.

sage: k.<b> = FiniteField(9)
sage: i*b
<boom>

CC: @rbeezer @orlitzky

Component: basic arithmetic

Keywords: multiply, arithmetic, incompatible

Reviewer: Michael Orlitzky

Issue created by migration from https://trac.sagemath.org/ticket/10960

@orlitzky
Copy link
Contributor

orlitzky commented Dec 2, 2012

comment:1

This is fixed by Burcin's patch in #13739. I just accidentally rebased it without noticing that it had a dependency, but I think the dependency is just for the line or two of context in the patch.

Anyway, I added the test case from this ticket, so when #13739 gets applied we can close this, too.

@orlitzky
Copy link
Contributor

orlitzky commented Jan 8, 2013

comment:2

The fix and doctest are both in, so this can be closed.

@orlitzky
Copy link
Contributor

orlitzky commented Jan 8, 2013

Reviewer: Michael Orlitzky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants