Skip to content

Commit 8a163da

Browse files
authored
Fix rand and randn type piracy
1 parent 878efce commit 8a163da

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/utilities.jl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
const AbstractScalarOrVec{T} = Union{T,AbstractVector{T}} where {T<:AbstractFloat}
22

3-
# Support of passing a vector of RNGs
4-
5-
Base.rand(rng::AbstractVector{<:AbstractRNG}) = rand.(rng)
6-
7-
Base.randn(rng::AbstractVector{<:AbstractRNG}) = randn.(rng)
8-
9-
function Base.rand(rng::AbstractVector{<:AbstractRNG}, T, n_chains::Int)
10-
@argcheck length(rng) == n_chains
11-
return rand.(rng, T)
12-
end
13-
14-
function Base.randn(rng::AbstractVector{<:AbstractRNG}, T, dim::Int, n_chains::Int)
15-
@argcheck length(rng) == n_chains
16-
return cat(randn.(rng, T, dim)...; dims = 2)
17-
end
18-
193
"""
204
`rand_coupled` produces coupled randomness given a vector of RNGs. For example,
215
when a vector of RNGs is provided, `rand_coupled` peforms a single `rand` call

0 commit comments

Comments
 (0)