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

 
 

bug #30128: sort with trailing singleton dimensions

Submitter:  Jaroslav Hajek <highegg>
Submitted:  Mon 14 Jun 2010 12:59:54 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  highegg
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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

Fixing th tests, closing this bug.

Jaroslav Hajek <highegg>
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>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2010-06-16 highegg StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code