-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Rewrite diagonal matrix constructor #10604
Comments
This comment has been minimized.
This comment has been minimized.
comment:3
Attachment: trac_10604-diagonal-matrix-constructor.patch.gz Patch contains an overhaul of the
|
Reviewer: Dan Drake |
Author: Rob Beezer |
comment:4
I read over the code and it looks nice. I love patches that add tons and tons of documentation! I'll run some doctests and make sure this works properly. |
comment:5
Hmm, this is weird:
Your examples seem to have all RDF entries; my example has numpy int64 entries. Do you see what's going on here? |
comment:6
I'm also seeing a doctest failure:
...and a bunch of similar failures in the same file. |
comment:7
Replying to @dandrake: Thanks, Dan. The int64 makes sense, I think I need to return the I'll get back to it again in a bit. Rob |
comment:8
Replying to @dandrake:
Smith Form seems to be unhappy about getting a sparse matrix:
|
comment:9
Sparse integer matrices get sent to the generic Smith form routine (which I suspect is broken, #10625). It fails on an integer matrix. Solution is to direct sparse integer matrices to the dense version and report the generic version. That change is at #10626, and this ticket will now depend on that patch. |
comment:10
v2 patch depends on #10626 to avoid the sparse/smith-form problem, and the numpy types are now all automatically handled by the |
comment:12
Passes all tests in devel/sage with patches described above, so I think this is ready now. |
comment:13
Green light from the patchbot...code is good. Positive review. Release manager: apply #10537 and #10626 first, then only attachment: trac_10604-diagonal-matrix-constructor-v2.patch. |
comment:14
Hi Dan, Thanks for your help with this and staying with it - much improved based on your testing (and I may be able to excise some I missed seeing the green light. Dang. I've not been paying much attention to the patchbot since it would fail so often on the startup tests, but maybe that is fixed now. Rob |
comment:15
There are some doctest failures:
|
comment:16
Replying to @jdemeyer:
The second-to-last comment says that you need to apply #10626 first. |
comment:18
Replying to @rbeezer:
I tried it against 4.6.2.alpha2, and I think I spoke too soon above...I applied #10626 and I'm still seeing the failure. So this does need some work, but (like Rob) I won't be able to do it in the next couple days. |
comment:19
Replying to @jdemeyer:
The root of the problem is line 4426 in the
which works poorly when given a sparse matrix. Interestingly, it works the other way around: you can stack a sparse matrix on top of a dense one. So we need to fix |
fix failing doctest in number_field_ideal.py |
comment:20
Attachment: trac_10604_fix_matrix_stack.gz Can someone who knows the matrix code take a look at my patch? All doctests pass with the two patches here applied to 4.6.2.alpha2. |
This comment has been minimized.
This comment has been minimized.
comment:22
Replying to @dandrake:
Thanks, Dan. I'll look at this more carefully this evening - should have time then. The root problem here is my decision to return a diagonal matrix as sparse since that is exposing a variety of inconsistencies. If I had it to do over.... Anyway, I suspect Thanks for the detective work on this one. Rob |
Changed author from Rob Beezer to Rob Beezer, Dan Drake |
Changed reviewer from Dan Drake to Dan Drake, Rob Beezer |
This comment has been minimized.
This comment has been minimized.
comment:23
Replying to @dandrake:
Dan's patch looks good and with it, all tests pass. So I'll flip this back to positive review. Thanks, Dan. |
Merged: sage-4.6.2.alpha4 |
Diagonal matrix constructor fails when given a tuple, and there is a request to support numpy arrays as input. This seems easiest to accomplish with a re-write and documentation upgrade.
NumPy
array request:http://groups.google.com/group/sage-devel/browse_thread/thread/f0ecd06fcf9efb1b
Apply:
Depends: #10626
CC: @dandrake
Component: linear algebra
Author: Rob Beezer, Dan Drake
Reviewer: Dan Drake, Rob Beezer
Merged: sage-4.6.2.alpha4
Issue created by migration from https://trac.sagemath.org/ticket/10604
The text was updated successfully, but these errors were encountered: