Draft
Conversation
…aph_array_multiscale
…aph_array_multiscale
Member
|
That will be awesome, @yfukai. It's very rudimentary, and we don't automatically check in the CI if the performance gets worse, but it's still a way to keep track of it. |
JoOkuma
reviewed
Oct 15, 2025
Comment on lines
128
to
131
| def mask_indices( | ||
| self, | ||
| offset: NDArray[np.integer] | int = 0, | ||
| ) -> tuple[NDArray[np.integer], ...]: |
Member
There was a problem hiding this comment.
@yfukai, I don't know if it's faster or slower, but would it make sense to use this
def mask_indices(
self,
offset: NDArray[np.integer] | int = 0,
strides: NDArray[np.integer] | int = 1, # new parameter
) -> tuple[NDArray[np.integer], ...]:With the previous implementation?
b8617fc
I remember you updated this because the binary mask approach was much faster.
Member
There was a problem hiding this comment.
and use this only if strides != 1
Contributor
Author
There was a problem hiding this comment.
Thanks for your suggestion! Maybe we should benchmark different approaches.
Contributor
Author
|
Hi thanks @JoOkuma! Would it be fine if I rewrite or add benchmarks using asv? |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 pull request introduces support for arbitrary strides in the
GraphArrayViewclass, allowing for efficient downsampling and subsetting of graph-based array data. I'm planning to benchmark this approach and mark this ready for review if I find this approach efficient.