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

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

Re: [Octave-bug-tracker] ndgrid test results in mingw


From: John D
Subject: Re: [Octave-bug-tracker] ndgrid test results in mingw
Date: Mon, 11 Nov 2013 08:06:18 -0500


-----Original Message-----
From: Rik [mailto:address@hidden 
Sent: Sunday, November 10, 2013 9:36 PM
To: John W. Eaton; Mike Miller; John Donoghue; address@hidden
Subject: [bug #40381] MXE / MinGW - setenv does not work correctly

Follow-up Comment #39, bug #40381 (project octave):

Looking over the failed tests, one caught my eye.


x = 1:3;
assert (isequal (ndgrid (x), x(:)));
ASSERT errors for:  assert (ndgrid ([]),zeros (0, 1))
reshape: can't reshape 1x3 array to 3x0 array


I think it would be worth setting a breakpoint in ndgrid and then 
single-stepping through the code to see where the problem lies.  ndgrid.m is a 
short file so it should be easy.


    _______________________________________________________

>> test ndgrid
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 43
43:   if (nargin == 0)
debug> whos varargin
Variables in the current scope:

   Attr Name          Size                     Bytes  Class
   ==== ====          ====                     =====  =====
    f   varargin      1x1                         24  cell

Total is 1 element using 24 bytes
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 45
45:   elseif (nargin == 1)
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 46
46:     n = max ([nargout, 1]);
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 48
48:     varargin(1:n) = varargin(1);
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 57
57:   shape = zeros (1, n);
debug> n
n =  1
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 58
58:   for i = 1:n
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 59
59:     if (! isvector (varargin{i}) && ! isempty (varargin{i}))
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 62
62:     shape(i) = length (varargin{i});
debug> whos varargin{i}
Variables in the current scope:

   Attr Name             Size                     Bytes  Class
   ==== ====             ====                     =====  =====
    f   varargin{i}      1x3                         24  double

Total is 3 elements using 24 bytes
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 65
65:   for i = 1:n
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 67
67:     r = ones (1, n);
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 68
68:     r(i) = shape(i);
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 71
71:     s = shape;
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 72
72:     s(i) = 1;
debug>
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m 
at line 74
74:     varargout{i} = repmat (reshape (varargin{i}, r), s);
debug> whos r
Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  =====
        r           1x1                          8  double

Total is 1 element using 8 bytes

debug> whos s
Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  =====
        s           1x1                          8  double
                                                                                
                          
Total is 1 element using 8 bytes
debug> varargin{i}
ans =

   1   2   3
debug> r
r =  3
debug> s
s =  1
debug> dbnext
error: reshape: can't reshape 1x3 array to 3x0 array
error: evaluating argument list element number 1
error: called from:
error:   C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\plot\util\ndgrid.m at 
line 74, column 17
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error:   __test__ at line 4, column 2
stopped in C:\octave-2013-11-09-19-03\share\octave\3.7.7+\m\testfun\test.m at 
line 529
529:         if (strcmp (__type, "xtest"))
debug>





reply via email to

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