-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]
Description
We ran into an issue trying to extend Base.reshape
in FluxML/Flux.jl#1448. Ideally, someone should only have to overload
Base.reshape(x::MySpecialArray, dims::Dims)
to get insert their custom behavior. Currently, calls involving a single :
bypass this method signature directly to the internal _reshape
. I'd like to redefine this line to be:
reshape(parent::AbstractArray, dims::Tuple{Vararg{Union{Int,Colon}}}) = reshape(parent, _reshape_uncolon(parent, dims))
so that it routes through the signature above after the uncolon logic is applied. I see no real problems with this, but I wanted to create an issue before a PR to get told why I'm wrong.
mbauman and CarloLucibello
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]