octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44071] ismember fails with unsorted complex s


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #44071] ismember fails with unsorted complex set
Date: Fri, 23 Jan 2015 04:49:20 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36

Update of bug #44071 (project octave):

              Item Group:                    None => Incorrect Result       
                  Status:                    None => Confirmed              
                 Summary: ismember fails to recognize set membership =>
ismember fails with unsorted complex set

    _______________________________________________________

Follow-up Comment #1:

Thanks for your bug report. The failure occurs because the column vector s is
not sorted and because issorted(s) returns true. The ismember function relies
on these functions to behave consistently for the provided set. So the fix
maybe should resolve issorted for complex inputs.


load ismember_bug.dat
issorted (s)     ## -> 1
s2 = sort (s);
isequal (s, s2)  ## -> 0
ismember (A, s)  ## -> 0
ismember (A, s2) ## -> 1


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44071>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]