bugGNU Octave - Bugs: bug #59637, Error message for '=' and...

 
 

bug #59637: Error message for '=' and nonconformant arguments

Submitter:  Guillaume <gyom>
Submitted:  Mon 07 Dec 2020 10:46:36 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 09 Mar 2021 11:22:07 PM UTC, comment #3: 

I verified the patch worked on examples in comment #0 and comment #2, and I ran 'make check' and everything passed.  I think this fix is good so I checked it in under jwe's name here http://hg.savannah.gnu.org/hgweb/octave/rev/2cfdcae08e84.

Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Sun 24 Jan 2021 11:46:32 AM UTC, comment #2: 

Not sure if this is the same bug or not:


a = ones(2,2,2);
a(2,2,2) = a
# error: =: nonconformant arguments (op1 is 2x2x2, op2 is 2x2x2)


(I would have expected op1 is 1x1 or something along those lines)

Tasos Papastylianou <tpapastylianou>
Fri 11 Dec 2020 06:14:35 PM UTC, comment #1: 

I'm not sure whether it is the best fix, but the attached patch appears to fix the problem for me.



(file #50440)

John W. Eaton <jwe>
Group administrator
Mon 07 Dec 2020 10:46:36 PM UTC, original submission:  

In the following, I would expect the two error messages to be identical to the first one:

+octave+
octave:1> A = rand(3,3);
octave:2> B = rand(2,2);
octave:3> A(1:2,1:3) = B;
error: =: nonconformant arguments (op1 is 2x3, op2 is 2x2)
octave:4> A(1:2,1:3,1) = B;
error: =: nonconformant arguments (op1 is 3x3x1, op2 is 2x2)
-octave-

Guillaume <gyom>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #50440:  assign-dims-error-diffs.txt added by jwe (912B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by tpapastylianou (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-09 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2020-12-11 jwe Attached File- Added assign-dims-error-diffs.txt, #50440
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code