Skip to content

Commit f142a91

Browse files
committed
Avoid throwing depwarn for zeros/ones methods defined in Base
1 parent c9aa4e3 commit f142a91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/OffsetArrays.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ end
159159

160160
# Deprecations
161161
import Base: zeros, ones
162-
@deprecate zeros(T::Type, inds::UnitRange...) fill!(OffsetArray{T}(inds), zero(T))
163-
@deprecate ones(T::Type, inds::UnitRange...) fill!(OffsetArray{T}(inds), one(T))
164-
@deprecate zeros(inds::UnitRange...) fill!(OffsetArray{Float64}(inds), 0)
165-
@deprecate ones(inds::UnitRange...) fill!(OffsetArray{Float64}(inds), 1)
162+
@deprecate zeros(T::Type, ind1::UnitRange, ind2::UnitRange, inds::UnitRange...) fill!(OffsetArray{T}((ind1, ind2, inds...)), zero(T))
163+
@deprecate ones(T::Type, ind1::UnitRange, inds2::UnitRange, inds::UnitRange...) fill!(OffsetArray{T}((ind1, ind2, inds...)), one(T))
164+
@deprecate zeros(ind1::UnitRange, ind2::UnitRange, inds::UnitRange...) fill!(OffsetArray{Float64}((ind1, ind2, inds...)), 0)
165+
@deprecate ones(ind1::UnitRange, ind2::UnitRange, inds::UnitRange...) fill!(OffsetArray{Float64}((ind1, ind2, inds...)), 1)
166166

167167
end # module

0 commit comments

Comments
 (0)