Skip to content

Commit b384104

Browse files
authored
Update doctests for Julia 1.6 (#44)
1 parent cde87c8 commit b384104

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Statistics.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ julia> mean([√1, √2, √3])
9696
1.3820881233139908
9797
9898
julia> mean(√, [1 2 3; 4 5 6], dims=2)
99-
2×1 Array{Float64,2}:
99+
2×1 Matrix{Float64}:
100100
1.3820881233139908
101101
2.2285192400943226
102102
```
@@ -113,17 +113,17 @@ Compute the mean of `v` over the singleton dimensions of `r`, and write results
113113
julia> using Statistics
114114
115115
julia> v = [1 2; 3 4]
116-
2×2 Array{Int64,2}:
116+
2×2 Matrix{Int64}:
117117
1 2
118118
3 4
119119
120120
julia> mean!([1., 1.], v)
121-
2-element Array{Float64,1}:
121+
2-element Vector{Float64}:
122122
1.5
123123
3.5
124124
125125
julia> mean!([1. 1.], v)
126-
1×2 Array{Float64,2}:
126+
1×2 Matrix{Float64}:
127127
2.0 3.0
128128
```
129129
"""
@@ -147,16 +147,16 @@ Compute the mean of an array over the given dimensions.
147147
julia> using Statistics
148148
149149
julia> A = [1 2; 3 4]
150-
2×2 Array{Int64,2}:
150+
2×2 Matrix{Int64}:
151151
1 2
152152
3 4
153153
154154
julia> mean(A, dims=1)
155-
1×2 Array{Float64,2}:
155+
1×2 Matrix{Float64}:
156156
2.0 3.0
157157
158158
julia> mean(A, dims=2)
159-
2×1 Array{Float64,2}:
159+
2×1 Matrix{Float64}:
160160
1.5
161161
3.5
162162
```
@@ -770,7 +770,7 @@ extrema and then computing their mean.
770770
julia> using Statistics
771771
772772
julia> a = [1,2,3.6,10.9]
773-
4-element Array{Float64,1}:
773+
4-element Vector{Float64}:
774774
1.0
775775
2.0
776776
3.6
@@ -845,7 +845,7 @@ Compute the median of an array along the given dimensions.
845845
julia> using Statistics
846846
847847
julia> median([1 2; 3 4], dims=1)
848-
1×2 Array{Float64,2}:
848+
1×2 Matrix{Float64}:
849849
2.0 3.0
850850
```
851851
"""
@@ -897,7 +897,7 @@ julia> quantile!(x, 0.5)
897897
2.0
898898
899899
julia> x
900-
3-element Array{Int64,1}:
900+
3-element Vector{Int64}:
901901
1
902902
2
903903
3
@@ -908,7 +908,7 @@ julia> quantile!(y, x, [0.1, 0.5, 0.9]) === y
908908
true
909909
910910
julia> y
911-
3-element Array{Float64,1}:
911+
3-element Vector{Float64}:
912912
1.2000000000000002
913913
2.0
914914
2.8000000000000003
@@ -1037,7 +1037,7 @@ julia> quantile(0:20, 0.5)
10371037
10.0
10381038
10391039
julia> quantile(0:20, [0.1, 0.5, 0.9])
1040-
3-element Array{Float64,1}:
1040+
3-element Vector{Float64}:
10411041
2.0
10421042
10.0
10431043
18.000000000000004

0 commit comments

Comments
 (0)