Mercurial > hg > octave-lojdl
changeset 14062:5b49cafe0599 stable
Use non-negative, non-positive with hyphens in error messages.
* accumarray.m, polyfit.m, factorial.m, nchoosek.m, mcnemar_test.m, find.cc,
graphics.cc, sparse.cc: Use non-negative, non-positive with hyphens in error
messages for consistency with documentation.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Thu, 15 Dec 2011 22:03:03 -0800 |
parents | 324b2ec6214d |
children | 6875d23ce051 |
files | scripts/general/accumarray.m scripts/polynomial/polyfit.m scripts/specfun/factorial.m scripts/specfun/nchoosek.m scripts/statistics/tests/mcnemar_test.m src/DLD-FUNCTIONS/find.cc src/graphics.cc src/sparse.cc |
diffstat | 8 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/accumarray.m +++ b/scripts/general/accumarray.m @@ -264,7 +264,7 @@ elseif (islogical (vals)) zero = true; elseif (fillval == 0 && all (vals(:) <= 0)) - ## This is a common case - fillval is zero, all numbers nonpositive. + ## This is a common case - fillval is zero, all numbers non-positive. zero = 0; else zero = NaN; # Neutral value.
--- a/scripts/polynomial/polyfit.m +++ b/scripts/polynomial/polyfit.m @@ -77,7 +77,7 @@ endif if (! (isscalar (n) && n >= 0 && ! isinf (n) && n == fix (n))) - error ("polyfit: N must be a nonnegative integer"); + error ("polyfit: N must be a non-negative integer"); endif y_is_row_vector = (rows (y) == 1);
--- a/scripts/specfun/factorial.m +++ b/scripts/specfun/factorial.m @@ -30,7 +30,7 @@ if (nargin != 1) print_usage (); elseif (any (n(:) < 0 | n(:) != fix (n(:)))) - error ("factorial: N must all be nonnegative integers"); + error ("factorial: N must all be non-negative integers"); endif x = round (gamma (n+1)); endfunction @@ -38,5 +38,5 @@ %!assert (factorial(5), prod(1:5)) %!assert (factorial([1,2;3,4]), [1,2;6,24]) %!assert (factorial(70), exp(sum(log(1:70))), -128*eps) -%!fail ('factorial(5.5)', "must all be nonnegative integers") -%!fail ('factorial(-3)', "must all be nonnegative integers") +%!fail ('factorial(5.5)', "must all be non-negative integers") +%!fail ('factorial(-3)', "must all be non-negative integers")
--- a/scripts/specfun/nchoosek.m +++ b/scripts/specfun/nchoosek.m @@ -68,7 +68,7 @@ endif if ((isscalar(v) && v < k) || k < 0 || k != round(k) || any (v < 0 || v != round(v))) - error ("nchoosek: args are nonnegative integers with V not less than K"); + error ("nchoosek: args are non-negative integers with V not less than K"); endif n = length (v);
--- a/scripts/statistics/tests/mcnemar_test.m +++ b/scripts/statistics/tests/mcnemar_test.m @@ -43,7 +43,7 @@ if (! (min (size (x)) > 1) && issquare (x)) error ("mcnemar_test: X must be a square matrix of size > 1"); elseif (! (all (all (x >= 0)) && all (all (x == fix (x))))) - error ("mcnemar_test: all entries of X must be nonnegative integers"); + error ("mcnemar_test: all entries of X must be non-negative integers"); endif r = rows (x);
--- a/src/DLD-FUNCTIONS/find.cc +++ b/src/DLD-FUNCTIONS/find.cc @@ -413,7 +413,7 @@ if (error_state || (val < 0 || (! xisinf (val) && val != xround (val)))) { - error ("find: N must be a nonnegative integer"); + error ("find: N must be a non-negative integer"); return retval; } else if (! xisinf (val))