Mercurial > octave
changeset 30594:0cb3f48da9da
doc: clarifies issorted only operates on vectors (bug #61765)
* libinterp/corefcn/data.cc (issorted): updates docstring to indicate that
issorted currently only works on vectors, or on matrices with the "rows" option.
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Wed, 05 Jan 2022 13:28:52 -0500 |
parents | bcaa4c5f5928 |
children | 00ab5e929111 |
files | libinterp/corefcn/data.cc |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/data.cc Wed Jan 05 15:57:06 2022 +0900 +++ b/libinterp/corefcn/data.cc Wed Jan 05 13:28:52 2022 -0500 @@ -7330,14 +7330,14 @@ @deftypefn {} {@var{tf} =} issorted (@var{a}) @deftypefnx {} {@var{tf} =} issorted (@var{a}, @var{mode}) @deftypefnx {} {@var{tf} =} issorted (@var{a}, "rows", @var{mode}) -Return true if the array is sorted according to @var{mode}, which may be either -@qcode{"ascend"}, @qcode{"descend"}, or @qcode{"either"}. +Return true if the vector @var{a} is sorted according to @var{mode}, which +may be either @qcode{"ascend"}, @qcode{"descend"}, or @qcode{"either"}. By default, @var{mode} is @qcode{"ascend"}. NaNs are treated in the same manner as @code{sort}. -If the optional argument @qcode{"rows"} is supplied, check whether the array is -sorted by rows as output by the function @code{sortrows} (with no options). +If the optional argument @qcode{"rows"} is supplied, check whether the matrix +is sorted by rows as output by the function @code{sortrows} (with no options). This function does not support sparse matrices. @seealso{sort, sortrows}