diff scripts/help/warning_ids.m @ 32058:e242124f1240

Overhaul input validation of sparse() function. * sparse.cc (Fsparse): Decode input type and identify floating point inputs. If input is of single type, emit new warning "Octave:sparse:double-conversion". If input is neither floating point or logical, then call err_wrong_type_arg() for pretty error message. Rename temporary variable 'k' to "argidx" for clarity. New temporary variable "arg" to increase readability of code. Add FIXME note about unreachable code due to behavior of get_dimensions(). * sparse.cc (Fissparse): Turn off warning about double-conversion temporarily for test which has single input. * warning_ids.m: Add description for new warning ID "Octave:sparse:double-conversion". * mk-sparse-tst.sh: Redo BIST tests for sparse() construction.
author Rik <rik@octave.org>
date Wed, 26 Apr 2023 10:09:09 -0700
parents 597f3ee61a48
children 2e484f9f1f18
line wrap: on
line diff
--- a/scripts/help/warning_ids.m	Wed Apr 26 09:55:12 2023 -0700
+++ b/scripts/help/warning_ids.m	Wed Apr 26 10:09:09 2023 -0700
@@ -410,6 +410,12 @@
 ## string constant.
 ## By default, the @code{Octave:single-quote-string} warning is disabled.
 ##
+## @item Octave:sparse:double-conversion
+## If the @code{Octave:sparse:double-conversion} warning is enabled, a warning
+## is printed when an implicit conversion from a full, single array occurs
+## during the creation of a sparse array.
+## By default, the @code{Octave:sparse:double-conversion} warning is enabled.
+##
 ## @item Octave:sqrtm:SingularMatrix
 ## If the @code{Octave:sqrtm:SingularMatrix} warning is enabled, a warning is
 ## printed if the matrix square root function @code{sqrtm} is called with an
@@ -459,5 +465,5 @@
 endfunction
 
 
-## Mark file as tested.  No test needed for a documentation m-file.
+## Mark file as tested.  No tests needed for a documentation m-file.
 %!assert (1)