[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #33197] sortrows does not work with single row
From: |
Marco Caliari |
Subject: |
[Octave-bug-tracker] [bug #33197] sortrows does not work with single row arrays |
Date: |
Mon, 02 May 2011 13:07:04 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 |
Follow-up Comment #2, bug #33197 (project octave):
I can fix the problem if I replace
return Array<octave_idx_type> (dim_vector (1, 0));
with
Array<octave_idx_type> idx;
idx.resize (dim_vector (1, 1));
idx(0) = 0;
return idx;
which is somehow similar to the result of sort some lines above. But maybe it
is safer to modify sortrows.m with something like
if (rows (A) == 1)
i = 1;
elseif (issparse (A))
...
Marco
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33197>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/