You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However the function clearly only works with integral values, as the OffsetArray constructor only accepts Ints. 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.
The text was updated successfully, but these errors were encountered:
Currently the function signature for
fill
isOffsetArrays.jl/src/OffsetArrays.jl
Lines 212 to 213 in 7294f3d
However the function clearly only works with integral values, as the
OffsetArray
constructor only acceptsInt
s. Something like this will fail:Should the types dispatched upon be constrained to
UnitRange{<:Integer}
? This will also allow other packages to define these methods for various otherUnitRange
types.The same for other functions like
zeros
,ones
,trues
,falses
.The text was updated successfully, but these errors were encountered: