octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47036] regressions in core m-files due to ism


From: Rik
Subject: [Octave-bug-tracker] [bug #47036] regressions in core m-files due to ismatrix changes
Date: Mon, 01 Feb 2016 03:53:57 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #47036 (project octave):

                Severity:              3 - Normal => 4 - Important          
                  Status:                    None => Confirmed              
                 Summary: cart2sph, pol2cart et al fail for 3D arrays (b/c of
is_matrix)  => regressions in core m-files due to ismatrix changes

    _______________________________________________________

Follow-up Comment #1:

I have a bad feeling that cart2sph is not the only example.  I think there are
probably several other scripts that were not changed when the definition of
ismatrix changed for 4.0.  This is because the regression tests passed so it
seemed that there was nothing to change.  In reality, the regression tests
themselves are incomplete and are not getting 100% line coverage.  

I used grep to make a list of instances of ismatrix that need to be reviewed. 
There are 62 instances.  In the past,


ismatrix (x) === ( isnumeric (x) || islogical (x) || ischar (x) )


Most likely ismatrix should at least be replaced by isnumeric.  It probably
isn't always necessary to include islogical and ischar.  For exapmle, the
sparse matrix m-files seem to get it right in that they check isnumeric and
ismatrix since they only work on 2-D numeric matrices.  The plot functions,
however, probably do need to include islogical and ischar since I bet Matlab
auto-converts those and plots them.

The list to review is:


gui/uigetfile.m:160:        if (ismatrix (val) && length (val) == 2)
gui/inputdlg.m:112:  elseif (ismatrix (linespec))
ode/private/ode_struct_value_check.m:125:          if ((! isnumeric (val) || !
ismatrix (val))
sparse/qmr.m:100:    elseif (isnumeric (A) && ismatrix (A))
sparse/qmr.m:127:    elseif (isnumeric (M1) && ismatrix (M1))
sparse/qmr.m:144:    elseif (isnumeric (M2) && ismatrix (M2))
sparse/bicgstab.m:79:    elseif (isnumeric(A) && ismatrix (A))
sparse/bicgstab.m:99:    elseif (isnumeric(M1) && ismatrix (M1))
sparse/bicgstab.m:111:    elseif (isnumeric(M2) && ismatrix (M2))
sparse/treeplot.m:40:  if (! ismatrix (tree) || rows (tree) != 1 || !
isnumeric (tree)
sparse/bicg.m:84:    elseif (isnumeric (A) && ismatrix (A))
sparse/bicg.m:111:    elseif (isnumeric (M1) && ismatrix (M1))
sparse/bicg.m:128:    elseif (isnumeric (M2) && ismatrix (M2))
sparse/gmres.m:82:  elseif (isnumeric (A) && ismatrix (A))
sparse/gmres.m:106:  elseif (isnumeric (M1) && ismatrix (M1))
sparse/gmres.m:118:  elseif (isnumeric (M2) && ismatrix (M2))
sparse/cgs.m:77:    elseif (isnumeric (A) && ismatrix (A))
sparse/cgs.m:97:    elseif (isnumeric (M1) && ismatrix (M1))
sparse/cgs.m:109:    elseif (isnumeric (M2) && ismatrix (M2))
sparse/spconvert.m:37:    if (nargin != 1 || ! ismatrix (m) || ! isreal (m)
optimization/fminunc.m:108:  if (nargin < 2 || nargin > 3 || ! ismatrix (x0))
optimization/lsqnonneg.m:90:      || ! (ismatrix (c) && ismatrix (d) &&
isstruct (options)))
optimization/fsolve.m:149:  if (nargin < 2 || nargin > 3 || ! ismatrix (x0))
optimization/pqpnonneg.m:82:      || ! (ismatrix (c) && ismatrix (d) &&
isstruct (options)))
image/gray2ind.m:48:  elseif (! ismatrix (I) || ndims (I) < 2)
general/cart2pol.m:52:    if (ismatrix (x) && (columns (x) == 2 || columns (x)
== 3))
general/cart2pol.m:62:    if (! ((ismatrix (x) && ismatrix (y))
general/cart2pol.m:67:    if (! ((ismatrix (x) && ismatrix (y) && ismatrix
(z))
general/cart2sph.m:51:    if (ismatrix (x) && columns (x) == 3)
general/cart2sph.m:59:    if (! ((ismatrix (x) && ismatrix (y) && ismatrix
(z))
general/pol2cart.m:52:    if (ismatrix (theta) && (columns (theta) == 2 ||
columns (theta) == 3))
general/pol2cart.m:62:    if (! ((ismatrix (theta) && ismatrix (r))
general/pol2cart.m:67:    if (! ((ismatrix (theta) && ismatrix (r) && ismatrix
(z))
general/sph2cart.m:51:    if (ismatrix (theta) && columns (theta) == 3)
general/sph2cart.m:59:    if (! ((ismatrix (theta) && ismatrix (phi) &&
ismatrix (r))
general/interp2.m:126:  if (! isnumeric (Z) || isscalar (Z) || ! ismatrix (Z)
|| ndims (Z) != 2)
geometry/delaunay.m:86:      if (! ismatrix (varargin{1})
geometry/delaunay.m:107:        if (! ismatrix (varargin{1}) || (ncols != 2 &&
ncols != 3))
geometry/inpolygon.m:51:  if (! (isreal (x) && isreal (y) && ismatrix (y) &&
ismatrix (y)
plot/util/private/__gnuplot_draw_axes__.m:1157:          if (isvector (xdat)
&& isvector (ydat) && ismatrix (zdat))
plot/util/private/__gnuplot_draw_axes__.m:1164:          elseif (ismatrix
(xdat) && ismatrix (ydat) && ismatrix (zdat))
plot/draw/contourc.m:100:  if (! ismatrix (z) || ! ismatrix (x) || ! ismatrix
(y))
plot/draw/private/__contour__.m:80:  if (! ismatrix (z1) || ! ismatrix (x1) ||
! ismatrix (y1))
plot/draw/private/__plt__.m:247:    elseif (ismatrix (x2))
plot/draw/private/__plt__.m:252:  elseif (ismatrix (x1))
plot/draw/private/__plt__.m:255:    elseif (ismatrix (x2))
plot/draw/private/__stem__.m:251:      elseif (ismatrix (y))
plot/draw/isosurface.m:148:    if (nargin >= 3 && ismatrix (varargin{3}))
plot/draw/polar.m:218:    elseif (ismatrix (rho))
plot/draw/polar.m:235:  elseif (ismatrix (theta))
plot/draw/polar.m:251:    elseif (ismatrix (rho))
plot/draw/shrinkfaces.m:96:  elseif (ismatrix (p) && nargin >= 2 && ismatrix
(varargin{2}))
plot/draw/surface.m:98:      if (isvector (x) && isvector (y) && ismatrix
(z))
plot/draw/surface.m:105:      elseif (ismatrix (x) && ismatrix (y) && ismatrix
(z))
plot/draw/surface.m:123:      if (isvector (x) && isvector (y) && ismatrix
(z))
plot/draw/surface.m:130:      elseif (ismatrix (x) && ismatrix (y) && ismatrix
(z))
plot/draw/surface.m:146:      if (ismatrix (z) && ! isvector (z) && ! isscalar
(z))
plot/draw/surface.m:162:      if (ismatrix (z) && ! isvector (z) && ! isscalar
(z))
plot/draw/tetramesh.m:62:  if (! ismatrix (T) || columns (T) != 4)
plot/draw/tetramesh.m:64:  elseif (! ismatrix (X) || columns (X) != 3)
statistics/tests/hotelling_test.m:50:  elseif (ismatrix (x))
statistics/tests/hotelling_test_2.m:66:  elseif (ismatrix (x))


I'm changing the title and increasing the Severity of the bug since this
really does need to get solved quickly.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47036>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]