-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Coercion errors of vectors from ZZ^2 and QQ^2 into CDF^2 #3103
Comments
comment:2
This is not due to coercion, but rather that dot product is not implemented for CDF^n.
Which, looking at element.pyx line 1904 shows that _dot_product_c_impl was never implemented for CDF. This should almost certainly be a NotImplementedError, or something like that, not a TypeError. In fact, there should just be a generic implementation. |
comment:3
The attached patch fixes the errors (they were in fact dot_product errors and not coercion) and adds doctests and functionality for preserving inner product matrices. |
comment:4
The patch solves the problem and cleans up a lot of old code. |
comment:5
This patch causes a number of doctest failures:
Cheers, Michael |
comment:9
In Sage 3.4.1.rc2, this works:
So this sounds like it is fixed. However, are there nice doctests from the above patch that could be added to the current code? Nick? |
comment:10
Yes, I agree with Jason. Once we add a patch that adds a doctest this ticket can be merged and closed. By maybe someone ought to check out if Nick's patch contains anything else. Cheers, Michael |
comment:11
Since the problem has been fixed, here is a very simple doctest that enforces it won't happen again. Patchbot ! apply trac_3103_add_doctest.patch |
Author: Charles Bouillaguet |
comment:12
Attachment: trac_3103_add_doctest.patch.gz took care of stupid TAB in the patch |
comment:13
Apply only trac_3103_add_doctest.patch |
Reviewer: Robert Bradshaw |
Merged: sage-5.7.beta1 |
With
I get the following coercion errors:
CC: @ncalexan @robertwb @jasongrout
Component: linear algebra
Keywords: vector CDF coerce
Author: Charles Bouillaguet
Reviewer: Robert Bradshaw
Merged: sage-5.7.beta1
Issue created by migration from https://trac.sagemath.org/ticket/3103
The text was updated successfully, but these errors were encountered: