@@ -448,6 +448,8 @@ _count(f, A::AbstractArrayOrBroadcasted, dims, init) = mapreduce(_bool(f), add_s
448
448
Count the number of elements in `A` for which `f` returns `true` over the
449
449
singleton dimensions of `r`, writing the result into `r` in-place.
450
450
451
+ $(_DOCS_ALIASING_WARNING)
452
+
451
453
!!! compat "Julia 1.5"
452
454
inplace `count!` was added in Julia 1.5.
453
455
@@ -525,8 +527,8 @@ sum(f, A::AbstractArray; dims)
525
527
sum!(r, A)
526
528
527
529
Sum elements of `A` over the singleton dimensions of `r`, and write results to `r`.
528
- Note that since the sum! function is intended to operate without making any allocations,
529
- the target should not alias with the source.
530
+
531
+ $(_DOCS_ALIASING_WARNING)
530
532
531
533
# Examples
532
534
```jldoctest
@@ -601,6 +603,8 @@ prod(f, A::AbstractArray; dims)
601
603
602
604
Multiply elements of `A` over the singleton dimensions of `r`, and write results to `r`.
603
605
606
+ $(_DOCS_ALIASING_WARNING)
607
+
604
608
# Examples
605
609
```jldoctest
606
610
julia> A = [1 2; 3 4]
@@ -678,6 +682,8 @@ maximum(f, A::AbstractArray; dims)
678
682
679
683
Compute the maximum value of `A` over the singleton dimensions of `r`, and write results to `r`.
680
684
685
+ $(_DOCS_ALIASING_WARNING)
686
+
681
687
# Examples
682
688
```jldoctest
683
689
julia> A = [1 2; 3 4]
@@ -755,6 +761,8 @@ minimum(f, A::AbstractArray; dims)
755
761
756
762
Compute the minimum value of `A` over the singleton dimensions of `r`, and write results to `r`.
757
763
764
+ $(_DOCS_ALIASING_WARNING)
765
+
758
766
# Examples
759
767
```jldoctest
760
768
julia> A = [1 2; 3 4]
@@ -820,6 +828,8 @@ extrema(f, A::AbstractArray; dims)
820
828
821
829
Compute the minimum and maximum value of `A` over the singleton dimensions of `r`, and write results to `r`.
822
830
831
+ $(_DOCS_ALIASING_WARNING)
832
+
823
833
!!! compat "Julia 1.8"
824
834
This method requires Julia 1.8 or later.
825
835
@@ -895,6 +905,8 @@ all(::Function, ::AbstractArray; dims)
895
905
896
906
Test whether all values in `A` along the singleton dimensions of `r` are `true`, and write results to `r`.
897
907
908
+ $(_DOCS_ALIASING_WARNING)
909
+
898
910
# Examples
899
911
```jldoctest
900
912
julia> A = [true false; true false]
@@ -968,6 +980,8 @@ any(::Function, ::AbstractArray; dims)
968
980
Test whether any values in `A` along the singleton dimensions of `r` are `true`, and write
969
981
results to `r`.
970
982
983
+ $(_DOCS_ALIASING_WARNING)
984
+
971
985
# Examples
972
986
```jldoctest
973
987
julia> A = [true false; true false]
@@ -1085,6 +1099,8 @@ end
1085
1099
Find the minimum of `A` and the corresponding linear index along singleton
1086
1100
dimensions of `rval` and `rind`, and store the results in `rval` and `rind`.
1087
1101
`NaN` is treated as less than all other values except `missing`.
1102
+
1103
+ $(_DOCS_ALIASING_WARNING)
1088
1104
"""
1089
1105
function findmin! (rval:: AbstractArray , rind:: AbstractArray , A:: AbstractArray ;
1090
1106
init:: Bool = true )
@@ -1156,6 +1172,8 @@ end
1156
1172
Find the maximum of `A` and the corresponding linear index along singleton
1157
1173
dimensions of `rval` and `rind`, and store the results in `rval` and `rind`.
1158
1174
`NaN` is treated as greater than all other values except `missing`.
1175
+
1176
+ $(_DOCS_ALIASING_WARNING)
1159
1177
"""
1160
1178
function findmax! (rval:: AbstractArray , rind:: AbstractArray , A:: AbstractArray ;
1161
1179
init:: Bool = true )
0 commit comments