Closed mjacobse closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.07%. Comparing base (
33fbc75
) to head (6db2712
). Report is 4 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
was vcat
using the wrong length?
was
vcat
using the wrong length?
Are you referring to col_length
and the change in 60eff16? No, in effect it was used correctly. Basically the helper stuffcol!
iterates from 0:(n-1)
where n
is the number of nonzeros in the column. Before 60eff16, it expected you to pass in n-1
for the argument called col_length
and then iterated 0:col_length
. After 60eff16 it expects you to pass in n
for the argument called col_length
and then iterates 0:(col_length-1)
. So the behavior does not change, but to my mind it is much clearer and consistent with the name of the argument. And as I intended to reuse the function in the new repeat
, I thought it would be better to make this clarifying change instead of reproducing the somewhat confusing usage.
@SobhanMP Can you add your review to this PR?
Thanks for the review! Anything left that I can do to help moving this forward?
@SobhanMP Good to merge?
yes, sorry I was behind a deadline :sweat_smile: @mjacobse, thanks for the code.
Calling
repeat
for sparse matrices or vectors currently calls theBase
function, which ends up building the result rather inefficiently with indexing brackets.This would add sparse versions that use the info that inputs are in CSC format to provide more efficient implementations. To keep it simple it is limited to the straightforward cases of outer repetition along the first two dimensions. Row-wise repetition is intentionally kept close to the implementation for
vcat
, also using its helper functionstuffcol!
(with slight modifications). Column-wise repetition is kept simple by deferring toBase.repeat
on thecolptr
,rowval
, andnzval
components of the CSC format.