Skip to content

Commit 5ebf8ad

Browse files
tkfnalimilan
andauthored
Apply suggestions from code review
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
1 parent de7b9bc commit 5ebf8ad

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

base/multidimensional.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,11 +1568,11 @@ end
15681568
"""
15691569
extrema([f,] A::AbstractArray; dims, [init]) -> Array{Tuple}
15701570
1571-
Compute the minimum and maximum of `f` applied to each element (if given) in the given
1572-
dimensions of `A`.
1571+
Compute the minimum and maximum elements of `A` over dimensions `dims`.
1572+
If `f` is provided, return the minimum and maximum elements after applying `f` to them.
15731573
15741574
!!! compat "Julia 1.2"
1575-
2-argument `extrema` method requires Julia 1.2 or later.
1575+
The `extrema(f, A)` method requires Julia 1.2 or later.
15761576
15771577
# Examples
15781578
```jldoctest

base/reduce.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,8 @@ minimum(a; kw...) = mapreduce(identity, min, a; kw...)
768768
Compute both the minimum and maximum element in a single pass, and return them as a 2-tuple.
769769
770770
The value returned for empty `itr` can be specified by `init`. It must be a 2-tuple whose
771-
first/second element is a neutral element for `min`/`max` (i.e. which is greater/less than
772-
or equal to any other element). This is required because it is unspecified whether `init`
771+
first and second elements are neutral elements for `min` and `max` respectively
772+
(i.e. which are greater/less than or equal to any other element).
773773
is used for non-empty collections. Note: it implies that, for empty `itr`, the first
774774
element is typically _greater_ than the last element. This is a "paradoxical" but yet
775775
expected result.
@@ -798,8 +798,8 @@ Compute both the minimum and maximum of `f` applied to each element in `itr` and
798798
them as a 2-tuple. Only one pass is made over `itr`.
799799
800800
The value returned for empty `itr` can be specified by `init`. It must be a 2-tuple whose
801-
first/second element is a neutral element for `min`/`max` (i.e. which is greater/less than
802-
or equal to any other element). This is required because it is unspecified whether `init`
801+
first and second elements are neutral elements for `min` and `max` respectively
802+
(i.e. which are greater/less than or equal to any other element).
803803
is used for non-empty collections. Note: it implies that, for empty `itr`, the first
804804
element is typically _greater_ than the last element. This is a "paradoxical" but yet
805805
expected result.

0 commit comments

Comments
 (0)