bugGNU Octave - Bugs: bug #45455, quantile returns sorted vector...

 
 

bug #45455: quantile returns sorted vector when called on singleton dimension

Submitted by:  Lachlan Andrew <lachlan>
Submitted on:  Wed 01 Jul 2015 01:05:36 PM 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:16:47 AM UTC, comment #3:

I pushed the patch to stable here (http://hg.savannah.gnu.org/hgweb/octave/rev/45759620a9a5) and credited you in the commit message. I also added a BIST test so we don't accidentally make the same mistake again. Thanks for contributing so many patches. I'm going to get to a few more of yours this weekend.

Rik <rik5>
Project Administrator
Tue 18 Aug 2015 05:48:37 AM UTC, comment #2:

I've updated this patch to version 4.0.0

(file #34671)

Lachlan Andrew <lachlan>
Project Member
Fri 03 Jul 2015 05:03:02 AM UTC, comment #1:

If the data ('x' in the function) is empty, then quantile crashes. The first patch I posed causes it to crash slightly earlier than it would otherwise, and so I'm submitting a new patch that avoids the crash.

(file #34368)

Lachlan Andrew <lachlan>
Project Member
Wed 01 Jul 2015 01:05:36 PM UTC, original submission:

I get

octave:1> quantile ([1 3 2], 0.5, 1)
ans =

1 2 3

instead of
octave:1> quantile ([1 3 2], 0.5, 1)
ans =

1 3 2

The attached patch fixes this.

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 #34671:  quantile_patch_2.txt added by lachlan (894B - text/plain - Update patch to 4.0.0 (only changes line offsets slightly))
file #34368:  quantile_patch_1.txt added by lachlan (892B - text/plain - Fix the problems with one-dimensional data and with empty data)
file #34354:  quantile_sort_patch.txt added by lachlan (336B - text/plain)

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 10 Oct 2015 02:16:47 AM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Mon 28 Sep 2015 03:07:18 PM UTCsiko1056StatusNone=>Patch Submitted
    Tue 18 Aug 2015 05:48:37 AM UTClachlanAttached File-=>Added quantile_patch_2.txt, #34671
    Fri 03 Jul 2015 05:03:02 AM UTClachlanAttached File-=>Added quantile_patch_1.txt, #34368
    Wed 01 Jul 2015 01:05:36 PM UTClachlanAttached File-=>Added quantile_sort_patch.txt, #34354

    Back to the top


    Powered by Savane 3.1-cleanup1