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

change order of arguments in fkeep, fix bug with fixed elements #240

Merged
merged 6 commits into from
Aug 30, 2022

Conversation

SobhanMP
Copy link
Member

@SobhanMP SobhanMP commented Aug 30, 2022

i think this is long due, like all higher order functions, it should take the function first.

@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2022

Codecov Report

Merging #240 (4ecf129) into main (43b4d01) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #240      +/-   ##
==========================================
+ Coverage   91.68%   91.82%   +0.14%     
==========================================
  Files          12       12              
  Lines        7302     7307       +5     
==========================================
+ Hits         6695     6710      +15     
+ Misses        607      597      -10     
Impacted Files Coverage Δ
src/sparsematrix.jl 94.69% <100.00%> (+0.41%) ⬆️
src/sparsevector.jl 95.13% <100.00%> (+0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@SobhanMP
Copy link
Member Author

@ whomever, merge when green

@dkarrasch
Copy link
Member

Do you have a test for the fix that fails before the fix and passes after? Do we want to keep deprecated versions of the previous internal functions in case someone used or extended them?

@SobhanMP
Copy link
Member Author

now i have, and i've done, good suggestions.

@rayegun
Copy link
Member

rayegun commented Aug 30, 2022

What was the rationale for function argument last in fkeep I wonder.

@SobhanMP
Copy link
Member Author

SobhanMP commented Aug 30, 2022

@dmbates what was your motivation in JuliaLang/julia@3ab2610 to put the funciton in fkeep! as the second argument?

@SobhanMP
Copy link
Member Author

SobhanMP commented Aug 30, 2022

my guess would be similar to cs_fkeep i.e.

CS_INT | cs_fkeep (cs *A, CS_INT(*fkeep)(CS_INT, CS_INT, CS_ENTRY, void *), void *other)

@rayegun
Copy link
Member

rayegun commented Aug 30, 2022

Oh I thought the name fkeep looked familiar. Good to know.

@SobhanMP
Copy link
Member Author

so good to go?

@rayegun
Copy link
Member

rayegun commented Aug 30, 2022

Actually wait. We should run nanosoldier

@SobhanMP
Copy link
Member Author

there is a deprecated "reverse" function that should make everything compatible.

@rayegun
Copy link
Member

rayegun commented Aug 30, 2022

Okay I guess that is sufficient. Lgtm

src/sparsematrix.jl Outdated Show resolved Hide resolved
src/sparsematrix.jl Outdated Show resolved Hide resolved
src/sparsematrix.jl Outdated Show resolved Hide resolved
src/sparsematrix.jl Outdated Show resolved Hide resolved
@SobhanMP SobhanMP merged commit dfcc48a into main Aug 30, 2022
@SobhanMP SobhanMP deleted the so/fkeep! branch August 30, 2022 22:28
fredrikekre added a commit to JuliaLang/julia that referenced this pull request Sep 16, 2022
This patch updates SparseArrays. In particular it contains
JuliaSparse/SparseArrays.jl#260 which is
necessary to make progress in #46759.

All changes:
 - Fix direction of circshift (JuliaSparse/SparseArrays.jl#260)
 - Fix `vcat` of sparse vectors with numbers (JuliaSparse/SparseArrays.jl#253)
 - decrement should always return a vector (JuliaSparse/SparseArrays.jl#241)
 - change order of arguments in fkeep, fix bug with fixed elements (JuliaSparse/SparseArrays.jl#240)
 - Sparse matrix/vectors with fixed sparsity pattern. (JuliaSparse/SparseArrays.jl#201)
fredrikekre added a commit to JuliaLang/julia that referenced this pull request Sep 16, 2022
This patch updates SparseArrays. In particular it contains
JuliaSparse/SparseArrays.jl#260 which is
necessary to make progress in #46759.

All changes:
 - Remove fkeep! from the documentation (JuliaSparse/SparseArrays.jl#261)
 - Fix direction of circshift (JuliaSparse/SparseArrays.jl#260)
 - Fix `vcat` of sparse vectors with numbers (JuliaSparse/SparseArrays.jl#253)
 - decrement should always return a vector (JuliaSparse/SparseArrays.jl#241)
 - change order of arguments in fkeep, fix bug with fixed elements (JuliaSparse/SparseArrays.jl#240)
 - Sparse matrix/vectors with fixed sparsity pattern. (JuliaSparse/SparseArrays.jl#201)
fredrikekre added a commit to JuliaLang/julia that referenced this pull request Sep 22, 2022
This patch updates SparseArrays. In particular it contains
JuliaSparse/SparseArrays.jl#260 which is
necessary to make progress in #46759.

All changes:
 - Fix ambiguities with Base. (JuliaSparse/SparseArrays.jl#268)
 - add == for vectors (JuliaSparse/SparseArrays.jl#248)
 - add undef initializers (JuliaSparse/SparseArrays.jl#263)
 - Make sure reductions benefit from sparsity (JuliaSparse/SparseArrays.jl#244)
 - Remove fkeep! from the documentation (JuliaSparse/SparseArrays.jl#261)
 - Fix direction of circshift (JuliaSparse/SparseArrays.jl#260)
 - Fix `vcat` of sparse vectors with numbers (JuliaSparse/SparseArrays.jl#253)
 - decrement should always return a vector (JuliaSparse/SparseArrays.jl#241)
 - change order of arguments in fkeep, fix bug with fixed elements (JuliaSparse/SparseArrays.jl#240)
 - Sparse matrix/vectors with fixed sparsity pattern. (JuliaSparse/SparseArrays.jl#201)
fredrikekre added a commit to JuliaLang/julia that referenced this pull request Sep 27, 2022
This patch updates SparseArrays. In particular it contains
JuliaSparse/SparseArrays.jl#260 which is
necessary to make progress in #46759.

All changes:
 - Fix ambiguities with Base. (JuliaSparse/SparseArrays.jl#268)
 - add == for vectors (JuliaSparse/SparseArrays.jl#248)
 - add undef initializers (JuliaSparse/SparseArrays.jl#263)
 - Make sure reductions benefit from sparsity (JuliaSparse/SparseArrays.jl#244)
 - Remove fkeep! from the documentation (JuliaSparse/SparseArrays.jl#261)
 - Fix direction of circshift (JuliaSparse/SparseArrays.jl#260)
 - Fix `vcat` of sparse vectors with numbers (JuliaSparse/SparseArrays.jl#253)
 - decrement should always return a vector (JuliaSparse/SparseArrays.jl#241)
 - change order of arguments in fkeep, fix bug with fixed elements (JuliaSparse/SparseArrays.jl#240)
 - Sparse matrix/vectors with fixed sparsity pattern. (JuliaSparse/SparseArrays.jl#201)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants