-
Notifications
You must be signed in to change notification settings - Fork 95
Add repeat frules and tests #406
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
Conversation
Co-authored-by: Miha Zgubic <[email protected]>
Co-authored-by: Miha Zgubic <[email protected]>
Co-authored-by: Miha Zgubic <[email protected]>
Co-authored-by: Miha Zgubic <[email protected]>
Co-authored-by: Miha Zgubic <[email protected]>
| function frule((_, Δx), ::typeof(repeat), x, m::Integer) | ||
| return repeat(x, m), repeat(Δx, m) | ||
| end | ||
|
|
||
| function frule((_, Δxs), ::typeof(repeat), xs; inner=ntuple(_->1, ndims(xs)), outer=ntuple(_->1, ndims(xs))) | ||
| return repeat(xs; inner=inner, outer=outer), repeat(Δxs; inner=inner, outer=outer) | ||
| end | ||
|
|
||
| function frule((_, Δx), ::typeof(repeat), x::AbstractArray{<:Real,0}, m::Integer) | ||
| return repeat(x, m), repeat(fill(Δx,m)) | ||
| end |
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.
These are the rules not covered by #460, which only did rrules. PR could be rebased to still add these.
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.
I will take a look at this around Wednesday this week after finishing my late JuliaCon vid. Sorry I lost track of them
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.
No rush, was just closing stale PRs & thought this one should get a note for whenever someone looks.
Hopefully I did this right, git-fu is WIP. This is based on PR #405, don't think I did that right... Are dependent PRs possible in GitHub?