-
Notifications
You must be signed in to change notification settings - Fork 38
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
Update BlockBandedMatrix iteration for new release #84
Conversation
I think just |
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.
Some comments, looks like more changes meeded
src/iteration_utils.jl
Outdated
cs = BlockArrays.blocklasts(BlockArrays.axes(Jac,2)) | ||
b = BlockBandedMatrices.BlockArray(vfx,rs) | ||
c = BlockBandedMatrices.BlockArray(colorvec,cs) | ||
@inbounds for J=BlockBandedMatrices.Block.(1:BlockBandedMatrices.nblocks(Jac,2)) |
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.
Should be J= blockaxes(Jac,2)
src/iteration_utils.jl
Outdated
cs = BlockArrays.axes((BlockBandedMatrices.cumulsizes(Jac,2),)) | ||
b = BlockBandedMatrices.BlockArray(vfx,rs) | ||
c = BlockBandedMatrices.BlockArray(colorvec,cs) | ||
@inbounds for J=BlockBandedMatrices.Block.(1:BlockBandedMatrices.nblocks(Jac,2)) |
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.
J = blockaxes(Jac,2)
Yeah, the fact that it's a Block-valued range seems to be an issue. Do I just need to turn those from Block to Int? |
|
Looks like whatever |
|
But it seems |
Right, you need to call something like |
It needs the opposite of cumsum or something? |
This is likely the last one. I can't figure out what's supposed to replace the |
I think: length.(getindex.(axes(Jac), (blockcolrange[1], J))) I could add a convenience function for this, but to be honest the old names in BlockArrays.jl we’re always confusing to me, so my preference is to be explicit instead of adding more to the interface. |
Codecov Report
@@ Coverage Diff @@
## master #84 +/- ##
==========================================
- Coverage 74.07% 73.18% -0.89%
==========================================
Files 8 8
Lines 513 496 -17
==========================================
- Hits 380 363 -17
Misses 133 133
Continue to review full report at Codecov.
|
@dlfivefifty what's the right translation for
BlockArrays.axes(BlockBandedMatrices.cumulsizes(Jac,1))
?