Skip to content

Commit 242bd15

Browse files
authored
Don't check result of rand(d) in doc tests (#272)
1 parent 1aaceb9 commit 242bd15

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/filldist.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,13 @@ each element is sampled from the original distribution `d`.
1616
# Examples
1717
1818
```jldoctest; setup=:(using Distributions, Random)
19-
julia> d = filldist(Normal(0, 1), 4, 5) # size(Normal(0, 1)) == ()
20-
DistributionsAD.MatrixOfUnivariate{Continuous, Normal{Float64}, FillArrays.Fill{Normal{Float64}, 2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}(
21-
dists: Fill(Normal{Float64}(μ=0.0, σ=1.0), 4, 5)
22-
)
19+
julia> d = filldist(Normal(0, 1), 4, 5);
2320
2421
julia> size(d)
2522
(4, 5)
2623
27-
julia> Random.seed!(42); rand(d)
28-
4×5 Matrix{Float64}:
29-
-0.363357 0.816307 -2.11433 0.433886 -0.206613
30-
0.251737 0.476738 0.0437817 -0.39544 -0.310744
31-
-0.314988 -0.859555 -0.825335 0.517131 -0.0404734
32-
-0.311252 -1.46929 0.840289 1.44722 0.104771
24+
julia> rand(d) isa Matrix{Float64}
25+
true
3326
```
3427
"""
3528
filldist(d::Distribution, n1::Int, ns::Int...) = product_distribution(Fill(d, n1, ns...))

0 commit comments

Comments
 (0)