Open
Description
Currently the function signature for fill
is
OffsetArrays.jl/src/OffsetArrays.jl
Lines 212 to 213 in 7294f3d
However the function clearly only works with integral values, as the OffsetArray
constructor only accepts Int
s. Something like this will fail:
julia> fill(3.0,UnitRange(3.0,5.0))
ERROR: MethodError: no method matching OffsetArray(::Array{Float64,1}, ::Tuple{Float64})
Should the types dispatched upon be constrained to UnitRange{<:Integer}
? This will also allow other packages to define these methods for various other UnitRange
types.
The same for other functions like zeros
, ones
, trues
, falses
.
Metadata
Metadata
Assignees
Labels
No labels