bugGNU Octave - Bugs: bug #53808, [octave forge] (image) entropy...


bug #53808: [octave forge] (image) entropy fails because of change in hist in Octave 4.4

Submitted by:  None
Submitted on:  Wed 02 May 2018 12:58:07 PM UTC  
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  CarnĂ« Draug <carandraug>
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  other
Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

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


Sun 13 May 2018 01:33:26 PM UTC, comment #2: 

I think this is bug on the image package entropy and not a regression on Octave's core hist, because the norm argument to hist is the value to normalize the sum, and not a flag whether to normalize to sum 1.

I pushed http://hg.code.sf.net/p/octave/image/rev/952d7928776a Since the OP left no email or name, I signed it as Avinoam who prepare the patch.

Carnë Draug <carandraug>
Project MemberIn charge of this item.
Fri 11 May 2018 04:13:48 PM UTC, comment #1: 

Attached a patch with OP's fix suggestion (B)

(file #44141)

Avinoam Kalma <avinoam>
Project Member
Wed 02 May 2018 12:58:07 PM UTC, original submission:  


entropy([1 0])

leads to following error:

error: hist: NORM must be a numeric constant > 0
error: called from
    hist at line 151 column 7
    entropy at line 61 column 5

The error was introduced in changeset 24793:1fa1869650cc.

Proposals for solution:
A) allow logical arguments as 3rd parameter of hist
B) replace

P = hist (I (:), nbins, true);


P = hist (I (:), nbins, 1);

in entropy.m.



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

Attach Files:

Attached Files
file #44141:  entropy.diff added by avinoam (345B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by avinoam (Updated the item)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam

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

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-13 carandraug Open/ClosedOpen => Closed
    2018-05-13 carandraug StatusPatch Submitted => Fixed
    2018-05-11 avinoam Attached File- => Added entropy.diff, #44141
        StatusConfirmed => Patch Submitted
        Assigned toNone => carandraug
        Carbon-Copy- => Added carandraug
        Carbon-Copy- => Added hardy
    2018-05-02 mtmiller Carbon-CopyRemoved 80942 => -
    2018-05-02 mtmiller StatusNone => Confirmed
        Release4.2.2 => other
        Summaryimage package: entropy fails because of change in hist => [octave forge] (image) entropy fails because of change in hist in Octave 4.4

    Back to the top

    Powered by Savane 3.5