In the _get_items method there is a if-statement checking if the length of the indices inds to be extracted has the same length as the input rows, see reference below:
The idea then is to just return the data for the indices inds, without needing the value_inds. However, this assumes that the ordering of the input rows and cols is the same as the ordering of the object itself, which is not always the case. For example if the rows and cols come from a DSBSparse object with other block sizes, the returned arr array has the wrong ordering.
Suggested solution:
Remove the if-statement and just use the body of it instead.
In the _get_items method there is a if-statement checking if the length of the indices
inds
to be extracted has the same length as the inputrows
, see reference below:https://github.com/vincent-maillou/qttools/blob/3fac381befe9470d5fd45e268120cf097465e0dd/src/qttools/datastructures/dsbcoo.py#L103C1-L103C15
The idea then is to just return the data for the indices
inds
, without needing thevalue_inds
. However, this assumes that the ordering of the inputrows
andcols
is the same as the ordering of the object itself, which is not always the case. For example if therows
andcols
come from a DSBSparse object with other block sizes, the returnedarr
array has the wrong ordering.Suggested solution:
Remove the if-statement and just use the body of it instead.