bugGNU Octave - Bugs: bug #30128, sort with trailing singleton...

 
 

bug #30128: sort with trailing singleton dimensions

Submitted by:  Jaroslav Hajek <highegg>
Submitted on:  Mon 14 Jun 2010 12:59:54 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Jaroslav Hajek <highegg>
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 16 Jun 2010 10:55:21 AM UTC, comment #1:

Fixing th tests, closing this bug.

Jaroslav Hajek <highegg>In charge of this item.
Mon 14 Jun 2010 12:59:54 PM UTC, original submission:

Since at least 3.2.x, sort() refuses to sort along a trailing singleton dimension (which are auto-chopped):

octave:1> sort (rand (3), 3)
error: sort: dim must be a valid dimension

I believe this is wrong, though; other reductions don't behave this way (except nth_element, where I copied it from sort), i.e. they reinvent the trailing dimensions as you need them (as if any array had an infinite number of dimensions).

Without this, you'd need to special case trailing singleton dims in basically any user function taking a "dim" argument.

Can someone check this in some recent Matlab? I already pushed the change upstream, but now the build fails regression tests. Although common sense speaks for the change, I would like to see it verified before changing any tests.

Jaroslav Hajek <highegg>In charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by highegg (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 16 Jun 2010 10:55:21 AM UTChigheggStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1