[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #30128] sort with trailing singleton dimension
From: |
Jaroslav Hajek |
Subject: |
[Octave-bug-tracker] [bug #30128] sort with trailing singleton dimensions |
Date: |
Mon, 14 Jun 2010 12:59:55 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.5.9-0.1.1 Firefox/3.5.9 |
URL:
<http://savannah.gnu.org/bugs/?30128>
Summary: sort with trailing singleton dimensions
Project: GNU Octave
Submitted by: highegg
Submitted on: Mon 14 Jun 2010 12:59:54 PM GMT
Category: Interpreter
Severity: 3 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: highegg
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
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.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30128>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #30128] sort with trailing singleton dimensions,
Jaroslav Hajek <=