From 375c0a61ff875f6313a8d07090ab539857ffa27f Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Wed, 17 Dec 2025 14:31:46 +0530 Subject: [PATCH] Change reshape methods to accept a single argument at least --- src/FillArrays.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/FillArrays.jl b/src/FillArrays.jl index c8c04172..917a45ac 100644 --- a/src/FillArrays.jl +++ b/src/FillArrays.jl @@ -267,13 +267,14 @@ reshape(parent::AbstractFill, dims::Union{Integer,Colon}...) = reshape(parent, d # resolve ambiguity with Base reshape(parent::AbstractFillVector, dims::Colon) = parent -reshape(parent::AbstractFill, dims::Tuple{Vararg{Union{Integer,Colon}}}) = +reshape(parent::AbstractFill, dims::Tuple{Union{Integer,Colon}, Vararg{Union{Integer,Colon}}}) = fill_reshape(parent, Base._reshape_uncolon(parent, dims)...) -reshape(parent::AbstractFill, dims::Tuple{Vararg{Union{Int,Colon}}}) = +reshape(parent::AbstractFill, dims::Tuple{Union{Int,Colon}, Vararg{Union{Int,Colon}}}) = fill_reshape(parent, Base._reshape_uncolon(parent, dims)...) reshape(parent::AbstractFill, shp::Tuple{Union{Integer,Base.OneTo}, Vararg{Union{Integer,Base.OneTo}}}) = reshape(parent, Base.to_shape(shp)) -reshape(parent::AbstractFill, dims::Dims) = fill_reshape(parent, dims...) +reshape(parent::AbstractFill, dims::Tuple{Int, Vararg{Int}}) = fill_reshape(parent, dims...) +reshape(parent::AbstractFill, dims::Tuple{}) = fill_reshape(parent, dims...) reshape(parent::AbstractFill, dims::Tuple{Integer, Vararg{Integer}}) = fill_reshape(parent, dims...) # resolve ambiguity with Base