octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45451] quantile fails to take multiple quanti


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #45451] quantile fails to take multiple quantiles when a the argument has one non-NaN
Date: Wed, 01 Jul 2015 06:53:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?45451>

                 Summary: quantile   fails to take multiple quantiles when a
the argument has one non-NaN
                 Project: GNU Octave
            Submitted by: lachlan
            Submitted on: Wed 01 Jul 2015 06:53:07 AM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Lachlan
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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"?




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 01 Jul 2015 06:53:07 AM GMT  Name: quantile_patch.txt  Size: 339B  
By: lachlan
possible patch to fix quantile bug
<http://savannah.gnu.org/bugs/download.php?file_id=34351>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45451>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]