-
Notifications
You must be signed in to change notification settings - Fork 4
Graph array multiscale #175
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
base: main
Are you sure you want to change the base?
Conversation
…aph_array_multiscale
…aph_array_multiscale
|
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. |
| def mask_indices( | ||
| self, | ||
| offset: NDArray[np.integer] | int = 0, | ||
| ) -> tuple[NDArray[np.integer], ...]: |
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.
@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.
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.
and use this only if strides != 1
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.
Thanks for your suggestion! Maybe we should benchmark different approaches.
|
Hi thanks @JoOkuma! Would it be fine if I rewrite or add benchmarks using asv? |
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.