Skip to content

Commit ae786f0

Browse files
committed
more 1.0 fixes
1 parent a7c5d48 commit ae786f0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Sobol.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ VERSION < v"0.7.0-beta2.199" && __precompile__()
22

33
module Sobol
44
using Compat, Compat.Random
5-
export SobolSeq, ScaledSobolSeq, next!
5+
export SobolSeq, ScaledSobolSeq, next!, next
6+
@static if isdefined(Base, :next)
7+
import Base: next
8+
end
69

710
include("soboldata.jl") #loads `sobol_a` and `sobol_minit`
811

@@ -78,9 +81,6 @@ function next!(s::SobolSeq, x::AbstractVector{<:AbstractFloat})
7881
end
7982
next!(s::SobolSeq) = next!(s, Array{Float64,1}(undef, ndims(s)))
8083

81-
@static if isdefined(Base, :next)
82-
import Base: next
83-
end
8484
@deprecate next(s::AbstractSobolSeq) next!(s)
8585

8686
# if we know in advance how many points (n) we want to compute, then
@@ -140,7 +140,7 @@ end
140140
next!(s::SobolSeq{N}, lb::AbstractVector, ub::AbstractVector) where {N} = next!(s, Vector{Float64}(undef, N), lb, ub)
141141

142142
next!(s::ScaledSobolSeq, x::AbstractVector{<:AbstractFloat}) = next!(s.s, x, s.lb, s.ub)
143-
Base.next(s::ScaledSobolSeq) = next!(s, Vector{Float64}(undef, ndims(s)))
143+
next(s::ScaledSobolSeq) = next!(s, Vector{Float64}(undef, ndims(s)))
144144

145145
Base.skip(s::ScaledSobolSeq, n) = skip(s.s, n)
146146

0 commit comments

Comments
 (0)