bugGNU Octave - Bugs: bug #45451, quantile fails to take multiple...

 
 

bug #45451: quantile fails to take multiple quantiles when a the argument has one non-NaN

Submitter:  Lachlan Andrew <lachlan>
Submitted:  Wed 01 Jul 2015 06:53:07 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Lachlan Open/Closed:  * Closed
Release:  * 3.8.2 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 10 Oct 2015 02:26:59 AM UTC, comment #1: 

This bug appears to have been fixed by your other patch for bug #45455.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Wed 01 Jul 2015 06:53:07 AM UTC, original submission:  

I get

octave:1> quantile([1  NaN], [0.1 0.5], 2)
error: _quantile_: A(I,J): column index out of bounds; value 2 out of bound 1
error: called from:
error:   /home/lachlan/src/octave-3.8.2-play/scripts/statistics/base/quantile.m at line 407, column 19
error:   /home/lachlan/src/octave-3.8.2-play/scripts/statistics/base/quantile.m at line 149, column 5


when I expect

> quantile([1 NaN], [0.1 0.2], 2)

ans =
    1    1


The attached patch gives the right answer in this particular case, but I don't really understand what lines 406 and 407 are trying to achieve, so it may be totally wrong.

BTW, which "item group" applies to a function that crashes but doesn't cause octave itself to crash?  Is it "crash" or "incorrect result"?

Lachlan Andrew <lachlan>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #34351:  quantile_patch.txt added by lachlan (339B - text/plain - possible patch to fix quantile bug)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by lachlan (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 group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-10-10 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2015-09-28 siko1056 StatusNone Patch Submitted
    2015-07-01 lachlan Attached File- Added quantile_patch.txt, #34351

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code