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

Submitted by:  Lachlan Andrew <lachlan>
Submitted on:  Wed 01 Jul 2015 06:53:07 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: LachlanOpen/Closed: Closed
Release: 3.8.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project 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>
Project Member

 

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

Attach File(s):
   
   
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
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by siko1056 (Updated the item)
  • -unavailable- added by lachlan (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 10 Oct 2015 02:26:59 AM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Mon 28 Sep 2015 03:06:55 PM UTCsiko1056StatusNone=>Patch Submitted
    Wed 01 Jul 2015 06:53:07 AM UTClachlanAttached File-=>Added quantile_patch.txt, #34351

    Back to the top


    Powered by Savane 3.1-cleanup1