-
Notifications
You must be signed in to change notification settings - Fork 20
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
Extend chunk
to take size
as an argument
#112
Conversation
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.
Adding method chunk(x; size)
looks good to me. A test for the new method is still missing. Or is it sufficient to test it implicitly via method chunk(x, n)
?
Additionally I added some comments suggesting to use function cld()
for simplification.
I'm not familiar with writing rrule
s as well, therefore I'm not able to check that.
Add tests for `chunk` with `size`
Thanks for the comments! I've changed the code to use |
Codecov Report
@@ Coverage Diff @@
## main #112 +/- ##
==========================================
- Coverage 88.55% 88.36% -0.19%
==========================================
Files 13 13
Lines 533 533
==========================================
- Hits 472 471 -1
- Misses 61 62 +1
Continue to review full report at Codecov.
|
👍 |
Bump? |
Should close #109. I would've left this to the author of that issue but I need this for some of the Metalhead.jl work on Res2Net.
This PR extends
chunk
to expect an optional kwargsize
, which should return chunks of sizesize
. I've rewritten the waychunk(x, n)
works since that seemed like a natural extension and tests pass, but I'm not an expert at therrule
stuff so if there's something wrong feedback would be appreciated 😅