File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,15 @@ largest values and `isgreater` defines a descending total order with `NaN` and
213
213
This is unexported. Types should not usually implement this function. Instead, implement `isless`.
214
214
"""
215
215
isgreater (x, y) = isunordered (x) || isunordered (y) ? isless (x, y) : isless (y, x)
216
+
217
+ """
218
+ isunordered(x)
219
+
220
+ Return true if `x` is a value that is not normally orderable, such as `NaN` or `missing`.
221
+
222
+ !!! compat "Julia 1.7"
223
+ This method requires Julia 1.7 or later.
224
+ """
216
225
isunordered (x) = false
217
226
isunordered (x:: AbstractFloat ) = isnan (x)
218
227
isunordered (x:: Missing ) = true
Original file line number Diff line number Diff line change @@ -775,6 +775,9 @@ are multiple maximal points, then the first one will be returned.
775
775
776
776
Values are compared with `isless`.
777
777
778
+ !!! compat "Julia 1.7"
779
+ This method requires Julia 1.7 or later.
780
+
778
781
# Examples
779
782
780
783
```jldoctest
@@ -828,6 +831,9 @@ are multiple minimal points, then the first one will be returned.
828
831
829
832
`NaN` is treated as less than all other values except `missing`.
830
833
834
+ !!! compat "Julia 1.7"
835
+ This method requires Julia 1.7 or later.
836
+
831
837
# Examples
832
838
833
839
```jldoctest
@@ -881,6 +887,9 @@ If there are multiple maximal values for `f(x)` then the first one will be found
881
887
882
888
Values are compared with `isless`.
883
889
890
+ !!! compat "Julia 1.7"
891
+ This method requires Julia 1.7 or later.
892
+
884
893
# Examples
885
894
```jldoctest
886
895
julia> argmax(abs, -10:5)
@@ -926,6 +935,9 @@ If there are multiple minimal values for `f(x)` then the first one will be found
926
935
927
936
`NaN` is treated as less than all other values except `missing`.
928
937
938
+ !!! compat "Julia 1.7"
939
+ This method requires Julia 1.7 or later.
940
+
929
941
# Examples
930
942
```jldoctest
931
943
julia> argmin(sign, -10:5)
You can’t perform that action at this time.
0 commit comments