bugGNU Octave - Bugs: bug #48368, size () should give an error for...


bug #48368: size () should give an error for non-scalar DIM

Submitted by:  Lachlan Andrew <lachlan>
Submitted on:  Fri 01 Jul 2016 07:10:51 PM UTC  
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  Lachlan Andrew <lachlan>
Originator Name:  Lachlan Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 01 Jul 2016 08:52:54 PM UTC, comment #1: 

I pushed your patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/e67ff2b11147).  I didn't feel it was important to tell the user exactly how they were wrong by including the size of the object they passed in for DIM.  Instead, I just emit an error with a message about what DIM should have been.

Correcting size() also uncovered two errors in gallery.m that I fixed as well.

Rik <rik5>
Project Administrator
Fri 01 Jul 2016 07:10:51 PM UTC, original submission:  

Taking  size ([1 2 3], [4;5;6]) gives 1 instead of an error that the second argument is not a scalar.

I'll post the patch once I have the bug number.

Lachlan Andrew <lachlan>In charge of this item.


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

Attach Files:

Attached Files


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 lachlan (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-01 rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2016-07-01 lachlan Attached File- => Added bug_48368_size_input_check.cset, #37656
        StatusNone => Patch Submitted
        Assigned toNone => lachlan

    Back to the top

    Powered by Savane 3.7