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

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

[Octave-bug-tracker] [bug #63411] mean function throws error for large D


From: Rik
Subject: [Octave-bug-tracker] [bug #63411] mean function throws error for large DIM inputs
Date: Wed, 23 Nov 2022 15:55:50 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?63411>

                 Summary: mean function throws error for large DIM inputs
                 Project: GNU Octave
               Submitter: rik5
               Submitted: Wed 23 Nov 2022 12:55:48 PM PST
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: Confirmed
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: stable
         Discussion Lock: Any
        Operating System: Any
           Fixed Release: None
         Planned Release: 8.1.0 (current stable)


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 23 Nov 2022 12:55:48 PM PST By: Rik <rik5>
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









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63411>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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