bugGNU Octave - Bugs: bug #49944, histc is not compatible with...

 
 

bug #49944: histc is not compatible with Matlab when edges set is empty

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Wed 28 Dec 2016 12:33:21 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: AvinoamOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Wed 08 Feb 2017 05:56:25 AM UTC, comment #6:

I checked in a fix here (http://hg.savannah.gnu.org/hgweb/octave/rev/af64b6b61db9). Closing report.

Rik <rik5>
Project Administrator
Wed 04 Jan 2017 07:24:59 PM UTC, comment #5:

Yes, I will try to prepare a changeset.

Avinoam Kalma <avinoam>
Project Member
Wed 04 Jan 2017 06:00:02 PM UTC, comment #4:

Do you want to prepare a changeset to convert the error to a warning? It's just an m-file so it should be easy.

Rik <rik5>
Project Administrator
Wed 28 Dec 2016 05:33:17 PM UTC, comment #3:

That's probably a good idea. The programmer should get some indication that there was something wrong.

Rik <rik5>
Project Administrator
Wed 28 Dec 2016 05:24:27 PM UTC, comment #2:

I have stumbled over this corner case while building and checking
VLFeat library.

One of the tests, vl_test_whistc.m fails (in function test_no_edges()) because
it expects to get Matlab histc results, and not errors.

Maybe Octave should output Matlab results, but with warning instead of error?

Avinoam Kalma <avinoam>
Project Member
Wed 28 Dec 2016 04:33:03 PM UTC, comment #1:

What is the use case for this? When would you want to supply zero edges and get back an empty matrix? Octave's careful checking of inputs seems better in this case because it will likely catch an error on the part of the programmer.

Rik <rik5>
Project Administrator
Wed 28 Dec 2016 12:33:21 PM UTC, original submission:

In Matlab:

In Octave I get errors:

Avinoam Kalma <avinoam>
Project Member

 

(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 rik5 (Posted a comment)
  • -unavailable- added by avinoam (Submitted the item)
  • -unavailable- added by avinoam
  •  

    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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 08 Feb 2017 05:56:25 AM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Release4.2.0=>dev
    Wed 04 Jan 2017 06:00:02 PM UTCrik5StatusNone=>Confirmed
    Wed 28 Dec 2016 12:33:21 PM UTCavinoamCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1