bugGNU Octave - Bugs: bug #63411, mean function throws error for...

 
 

bug #63411: mean function throws error for large DIM inputs

Submitter:  Rik <rik5>
Submitted:  Wed 23 Nov 2022 08:55:48 PM UTC
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * stable Operating System:  * Any
Fixed Release:  8.1.0 (current stable) Planned Release:  8.1.0 (current stable)
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Sat 03 Dec 2022 05:40:49 AM UTC, comment #1: 

I fixed things up in this changeset: http://hg.savannah.gnu.org/hgweb/octave/rev/59422a6fbd91

Marking as Fixed and closing report.

Rik <rik5>
Project Administrator
Wed 23 Nov 2022 08:55:48 PM UTC, original submission:  

Sample code

x = magic (3);
mean (x, [2,7])
error: permute: permutation vector contains an invalid element
error: called from
    mean at line 198 column 13

Matlab has no issues with this input.

Of note, large dimensions work when the DIM input is just a scalar (such as 7 in the example above).

There are two obvious strategies to solve this:
1) Do more input validation and issue an error if the dimension is outside the number of dimensions of the input.
2) Change the algorithm to return the Matlab-compatible answer for these sorts of inputs

Rik <rik5>
Project Administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (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 project members can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-12-03 rik5 Open/ClosedOpen Closed
    2022-12-03 rik5 StatusConfirmed Fixed
        Fixed ReleaseNone 8.1.0 (current stable)

    Back to the top


    Powered by Savane 3.9