-
Notifications
You must be signed in to change notification settings - Fork 38
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
Return an AbstractFill from view? #84
Comments
Ha I came across this issue and was planning to propose this change. I think this is a great idea. |
I worked around this in LazyArrays.jl: https://github.com/JuliaArrays/LazyArrays.jl/blob/42823c66a0344f61fafab1da96db5260079afd36/src/lazybroadcasting.jl#L213 But still preferable to overload |
Ha, just deleted a long post why this is a bad idea because range doesn't do it when I noticed julia> view(1:5, 1:3)
1:3 That said, #125 makes me hesitant that downstream packages will assume that v == parent(v)[parentindices(v)...] In fact the docs for
|
This has been implemented. |
As it is planned to return an
AbstractRange
fromview(::AbstractRange, ...)
JuliaLang/julia#26872, I think similarly it makes sense to return anAbstractFill
fromview(::AbstractFill, ...)
. I think it is also compatible withreshape(::AbstractFill, ...) :: AbstractFill
. What do you think?The text was updated successfully, but these errors were encountered: