(feat): feature set for backed
views of views
#4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a mechanism by which one could in theory do views-of-views of sparse data.
Conceptually,
to_backed
does the same thing as it did before but now thebacked
object which it returns is used into_memory
in conjunction with the saved indices to produce in memory representations of subsets of the data. So thebacked
classes have no notion of indices but theBaseCompressedSparseDataset
children do.Furthermore,
to_memory
is smart about which operation to do first (row or column subsetting) based in if it is operating with acsr
orcsc
matrix.This PR does not introduce the feature of views of views - this will come with the new
read_backed
method. For now, the goal is just to cut down on the review of that PR by introducing this as a rightfully independent feature that doesn't break anything.