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

sparse vector views remain sparse #416

Merged
merged 32 commits into from
Sep 9, 2023

Conversation

matbesancon
Copy link
Contributor

@matbesancon matbesancon commented Jul 21, 2023

Closes #402 for sparse vectors. Closes #225. Fixes JuliaLang/julia#46355.

I also relaxed the assumption that the view indexing must be a Base.OneTo, otherwise this is too restrictive for vectors

@SobhanMP
Copy link
Member

I think you need to call fun instead of +=, unless I don't understand the code

@matbesancon
Copy link
Contributor Author

absolutely, thanks!
🤦

@codecov
Copy link

codecov bot commented Jul 22, 2023

Codecov Report

Merging #416 (536d9fe) into main (c93065c) will increase coverage by 0.00%.
The diff coverage is 97.14%.

@@           Coverage Diff           @@
##             main     #416   +/-   ##
=======================================
  Coverage   93.20%   93.20%           
=======================================
  Files          12       12           
  Lines        7666     7700   +34     
=======================================
+ Hits         7145     7177   +32     
- Misses        521      523    +2     
Files Changed Coverage Δ
src/sparsevector.jl 95.42% <97.14%> (-0.04%) ⬇️

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

@matbesancon matbesancon changed the title sparse views behaviour sparse vector views remain sparse Jul 22, 2023
@matbesancon
Copy link
Contributor Author

Alright this is good for review on my side

@matbesancon
Copy link
Contributor Author

@ViralBShah this could be a step towards fixing the views: #225 (comment)

src/sparsevector.jl Outdated Show resolved Hide resolved
@matbesancon matbesancon reopened this Jul 25, 2023
@matbesancon
Copy link
Contributor Author

still haven't figured out what is causing the issue here

src/sparsevector.jl Outdated Show resolved Hide resolved
src/sparsevector.jl Outdated Show resolved Hide resolved
src/sparsevector.jl Outdated Show resolved Hide resolved
@SobhanMP SobhanMP closed this Aug 2, 2023
@SobhanMP SobhanMP reopened this Aug 2, 2023
vtjnash and others added 10 commits September 3, 2023 09:26
Ensures that Union{} is not part of the output possibilities after type-piracy of Base.cat methods.

Refs JuliaLang/julia#50550
This little gadget creates a closure over Type{T} instead of DataType.

Fix JuliaLang/julia#50623
Unfortunately, this test has become broken in the interim since it was
disabled by 176ef64 / a15fe4b.
…#423)

* Respect IOContext in printing column indices

* Add docstring to ColumnIndices
* add gitignore

* remove unused argument
The generic `cat` does more shape analysis, that typed_cat does not
always do (before either may then dispatch to _cat_t), so we can make
this faster by calling it instead.

Secondly, we can make `issparse` non-recursive once it hits a base case
where all trailing elements are the same. This makes it much better at
handling large splat, since we do not need to check each recursively
smaller type down to the base case using generic code, and just generate
one const method specialized on the full length instead.

Fix JuliaLang/julia#51011
Co-authored-by: Marco Cognetta <cognetta.marco@gmail.com>
@dkarrasch
Copy link
Member

I copied over the tests from #225 and thereby found a little oversight. I'll push the easy fix right after, and then we can merge after tests pass.

@dkarrasch dkarrasch merged commit ada9edd into JuliaSparse:main Sep 9, 2023
8 checks passed
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.

Subarrays of sparse should operate like sparse Cannot add SymTridiagonal matrices based on sparse vectors
8 participants