bugGNU Octave - Bugs: bug #51144, image package: mean2([]) gives...

 
 

bug #51144: image package: mean2([]) gives incompatible error

Submitted by:  Hartmut <hardy>
Submitted on:  Tue May 30 18:05:04 2017  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: otherOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Thu Jun 1 11:55:26 2017, comment #2:

I've tested the call to mean2 in Matlab with logicals, 3d arrays, imaginary numbers, sparse matrices. They all give a useful result. So, yes, removing all input checks was the right thing to do here for compatibility concerns.

Hartmut <hardy>
Tue May 30 22:30:18 2017, comment #1:

I have pushed http://hg.code.sf.net/p/octave/image/rev/12ef5a4b4fd8 which removes pretty much all input check. I added a bunch more checks for other special cases such as sparse matrices and imaginary numbers.

Carnë Draug <carandraug>
Project Member
Tue May 30 18:05:04 2017, original submission:

This happens with Octave 4.2.1 and image-2.6.1:

The corresponding output of Matlab (R20124b) is:

So the result of mean2 is NOT Matlab compatible for an empty matrix as input. Octave mean2 throws an error, Matlab doesn't.

And this incompatibility of mean2 cannot be blaimed onto te underlying (Octave core function) mean, because its output for an empty matrix as input IS Matlab compatible.

Hartmut <hardy>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by hardy (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue May 30 22:30:18 2017carandraugStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Release4.2.1=>other

    Back to the top


    Powered by Savane 3.1-cleanup1