-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix off by one in csc_premute and add test #12734
Conversation
pinv = randperm(10) | ||
p = zeros(Int, 10) | ||
# Invert pinv | ||
for (i, j) in enumerate(pinv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you use invperm
for this
9a7e8ff
to
3b23fbf
Compare
Fixed the stuff I was failing at. This fails locally but I am pushing it anyway because it is failing in a place it shouldn't. If I put the test where I did now, the test here fails. If I put it in the bottom of the file, everything passes. This seems to indicate that the test currently failing has some dependency on the random seed? @andreasnoack any ideas? |
The build log is too long so you have to download the raw log to see the test failure. Anyway here it is: ERROR: LoadError: On worker 3:
LoadError("/tmp/julia/share/julia/test/sparse.jl",3,LoadError("/tmp/julia/share/julia/test/sparsedir/sparse.jl",1078,ErrorException("assertion failed: |cond(Ac,Inf) - cond(full(Ac),Inf)| <= 0.0001\n cond(Ac,Inf) = 128.30458154354002\n cond(full(Ac),Inf) = 125.08790073210642\n difference = 3.216680811433605 > 0.0001")))
in error at error.jl:22
in test_approx_eq at test.jl:140
in include_string at loading.jl:229
in include_from_node1 at ./loading.jl:270
in include_string at loading.jl:229
in include_from_node1 at ./loading.jl:270
in runtests at /tmp/julia/share/julia/test/testdefs.jl:179
in anonymous at multi.jl:889
in run_work_thunk at multi.jl:642
in anonymous at task.jl:889
while loading /tmp/julia/share/julia/test/runtests.jl, in expression starting on line 13 |
@andreasnoack Should I just reorder the test to make this pass? |
3b23fbf
to
50c6201
Compare
I did that now. Should be ready to merge. |
Thanks. I think it is ready now. |
Fix off by one in csc_premute and add test
Fixes a simple mistake that happened when the original code got converted from C and adds a test. Also removed a faulty, unexported, untested
droptol
I added in another PR.