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

Fix indexing for offset views of BandedMatrixes #432

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Mar 18, 2024

On master

julia> B = BandedMatrix(0=>1:4)
4×4 BandedMatrix{Int64} with bandwidths (0, 0):
 1      
   2    
     3  
       4

julia> view(B, Base.IdentityUnitRange(2:4), 1:4)
3×4 view(::BandedMatrix{Int64, Matrix{Int64}, Base.OneTo{Int64}}, Base.IdentityUnitRange(2:4), 1:4) with eltype Int64 with indices 2:4×Base.OneTo(4):
     0  
       0
       

This PR

julia> view(B, Base.IdentityUnitRange(2:4), 1:4)
3×4 view(::BandedMatrix{Int64, Matrix{Int64}, Base.OneTo{Int64}}, Base.IdentityUnitRange(2:4), 1:4) with eltype Int64 with indices 2:4×Base.OneTo(4):
   2    
     3  
       4

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.57%. Comparing base (13b11fc) to head (3d4683b).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #432      +/-   ##
==========================================
- Coverage   89.59%   89.57%   -0.03%     
==========================================
  Files          25       25              
  Lines        3557     3559       +2     
==========================================
+ Hits         3187     3188       +1     
- Misses        370      371       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jishnub jishnub merged commit 797a574 into JuliaLinearAlgebra:master Mar 18, 2024
12 of 13 checks passed
@jishnub jishnub deleted the offsetbandedview branch March 18, 2024 16:53
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.

1 participant