Skip to content
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

Define ChainRulesCore.rrule for ReadOnlyArray #16

Open
SouthEndMusic opened this issue Jul 13, 2024 · 0 comments
Open

Define ChainRulesCore.rrule for ReadOnlyArray #16

SouthEndMusic opened this issue Jul 13, 2024 · 0 comments

Comments

@SouthEndMusic
Copy link

SouthEndMusic commented Jul 13, 2024

Suggestion:

function ChainRulesCore.rrule(::Type{ReadOnlyArray}, parent)
    read_only_array = ReadOnlyArray(parent)
    ReadOnlyArray_pullback(Δ) = NoTangent(), Δ
    read_only_array, ReadOnlyArray_pullback
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant