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

 
 

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

Submitter:  Lachlan Andrew <lachlan>
Submitted:  Wed 01 Jul 2015 01:05:36 PM 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: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>
Group 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>
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>
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>

 

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

Attach Files:
   
   
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
  • -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 6 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-08-18 lachlan Attached File- Added quantile_patch_2.txt, #34671
    2015-07-03 lachlan Attached File- Added quantile_patch_1.txt, #34368
    2015-07-01 lachlan Attached File- Added quantile_sort_patch.txt, #34354

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code