changeset 20056:059a05bc398c

Replace 'Octave:broadcast' warning with 'Octave:matlab-incompatible'. * liboctave/numeric/bsxfun.h: replace the 'Octave:broadcasting' with the more common 'Octave:matlab-compatible' warning which is off by default. * plot/appearance/annotation.m, image/cubehelix.m: remove turning off the warning since now it is done by default. * miscellaneous/warning_ids.m: remove entry about Octave:broadcast * NEWS: make note of this change.
author Carnë Draug <carandraug@octave.org>
date Sat, 21 Feb 2015 16:38:53 +0000
parents f81a1da191e4
children e9a0bd0b125c
files NEWS liboctave/numeric/bsxfun.h scripts/image/cubehelix.m scripts/miscellaneous/warning_ids.m scripts/plot/appearance/annotation.m
diffstat 5 files changed, 8 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS
+++ b/NEWS
@@ -268,6 +268,10 @@
  ** The warning ID Octave:singular-matrix-div has been replaced by
     Octave:nearly-singular-matrix and Octave:singular-matrix.
 
+ ** The warning ID Octave:broadcast has been removed.  Instead automatic
+    broadcasting will throw an Octave:matlab-incompatible warning, together
+    with other features not available in Matlab.
+
  ** The configure option --enable-octave-allocator has been removed.
     The internal class <octave_allocator> declared in oct-alloc.h has
     been removed.  The header remains, but is deprecated.  The macros to
--- a/liboctave/numeric/bsxfun.h
+++ b/liboctave/numeric/bsxfun.h
@@ -46,7 +46,8 @@
     }
 
   (*current_liboctave_warning_with_id_handler)
-    ("Octave:broadcast", "%s: automatic broadcasting operation applied",
+    ("Octave:matlab-incompatible",
+     "Matlab compatibility problem - %s automatic broadcasting",
      name.c_str ());
 
   return true;
@@ -76,7 +77,8 @@
     }
 
   (*current_liboctave_warning_with_id_handler)
-    ("Octave:broadcast", "%s: automatic broadcasting operation applied",
+    ("Octave:matlab-incompatible",
+     "Matlab compatibility problem - %s automatic broadcasting",
      name.c_str ());
 
   return true;
--- a/scripts/image/cubehelix.m
+++ b/scripts/image/cubehelix.m
@@ -64,7 +64,6 @@
     angle = 2 * pi * (start/3 + 1 + rots*fract);
     fract = fract .^ gamma;
     amp   = hue * fract .* (1-fract) /2;
-    warning ("off", "Octave:broadcast", "local");
     map   = fract + amp .* ([cos(angle) sin(angle)] * coeff);
 
     ## Clip values (only in case users have changed values of hue or gamma)
--- a/scripts/miscellaneous/warning_ids.m
+++ b/scripts/miscellaneous/warning_ids.m
@@ -122,11 +122,6 @@
 ## directory as the .oct file referred to by the autoload() command.
 ## By default, the @code{Octave:autoload-relative-file-name} warning is enabled.
 ##
-## @item Octave:broadcast
-## Warn when performing broadcasting operations.  By default, this is
-## enabled.  See @ref{Broadcasting} in the chapter Vectorization and Faster
-## Code Execution of the manual.
-##
 ## @item Octave:built-in-variable-assignment
 ## By default, the @code{Octave:built-in-variable-assignment} warning is
 ## enabled.
--- a/scripts/plot/appearance/annotation.m
+++ b/scripts/plot/appearance/annotation.m
@@ -669,7 +669,6 @@
 endfunction
 
 function [x, y] = arrowcoordinates (h, nar = [])
-  warning ("off", "Octave:broadcast", "local")
   pos = getnormpos (h);
   ppos = norm2pts (h, pos(3:4).');
   ang = angle (complex (ppos(1), ppos(2)));
@@ -830,8 +829,6 @@
 endfunction
 
 function XY = textcoordinates (hte, pos)
-  warning ("off", "Octave:broadcast", "local")
-
   ## Get the "tight" extent of the text object in points units
   textpos = get(hte, "position");
   rot = get (hte, "rotation");