bugGNU Octave - Bugs: bug #61752, unique.m FAIL in test suite

 
 

bug #61752: unique.m FAIL in test suite

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Sat 01 Jan 2022 04:52:41 PM UTC
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Duplicate Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

( Jump to the original submission )

Mon 03 Jan 2022 07:37:13 PM UTC, comment #10: 

That is expected. Symbol visibility on Windows was broken until late December. Octave always exported all symbols independent of the configure switches.
Bug #61711 only appears with visibility flags.

Markus Mützel <mmuetzel>
Project Member
Mon 03 Jan 2022 05:30:29 PM UTC, comment #9: 

Just FTR, in an Octave-8.0.0 for Windows built Dec. 4 I get:

>> unique ([1,NaN,2,NaN,2])
ans =
     1     2   NaN   NaN

(Don't know if this should be reported here or over in bug #61711.)

Philip Nienhuis <philipnienhuis>
Project Member
Mon 03 Jan 2022 01:44:08 PM UTC, comment #8: 

Tested with Octave 8.0.0 on Windows:

>> unique ([1,NaN,2,NaN,2])
ans =

     1   NaN     2   NaN     2

>> version -hgid
ans = 82b685157e2b

Closing as duplicate of bug #61711.

Markus Mützel <mmuetzel>
Project Member
Sun 02 Jan 2022 12:16:27 PM UTC, comment #7: 

I haven't looked into it. But I'm guessing `unique` sorts its input before finding (adjacent) duplicates. Since sorting NaN values doesn't work correctly with visibility flags (see bug #61711), the Inf values don't appear adjacent to each other after that step and aren't identified as non-unique...

If that's the case, something like this might not work either (can't test atm because I don't have an affected version at hand):

unique ([1,NaN,2,NaN,2])

Markus Mützel <mmuetzel>
Project Member
Sat 01 Jan 2022 08:33:38 PM UTC, comment #6: 

Bug #61711 is about NaN values, here Inf values seem to be an issue. But I wouldn't be surprised if this here is merely bug #61711 in a different disguise, That one's title should be adapted then.

Philip Nienhuis <philipnienhuis>
Project Member
Sat 01 Jan 2022 07:57:51 PM UTC, comment #5: 

Probably a duplicate of bug #61711.

Markus Mützel <mmuetzel>
Project Member
Sat 01 Jan 2022 05:54:40 PM UTC, comment #4: 

Right, it only fails with a crossbuild (all dependencies etc. up-to-date).

OS -> Windows.

Philip Nienhuis <philipnienhuis>
Project Member
Sat 01 Jan 2022 05:07:07 PM UTC, comment #3: 

Matlab specifically calls out in the help that NANs are treated as unique, while inf is not.

Nicholas Jankowski <nrjank>
Project Member
Sat 01 Jan 2022 05:04:20 PM UTC, comment #2: 

Also:

octave:3> unique ([1,NaN,Inf,NaN,Inf])
ans =

     1   Inf   NaN   NaN

Dmitri A. Sergatskov <dasergatskov>
Sat 01 Jan 2022 05:02:24 PM UTC, comment #1: 

./run-octave -qf
octave:1> __octave_config_info__ ("hg_id")
ans = 5d379d2ad903
octave:2> test unique
PASSES 52 out of 52 tests
octave:3>

buildbots also seem to be OK

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 01 Jan 2022 04:52:41 PM UTC, original submission:  

>> test unique
***** assert (unique ([1,NaN,Inf,NaN,Inf]), [1,Inf,NaN,NaN])
!!!!! test failed
ASSERT errors for:  assert (unique ([1, NaN, Inf, NaN, Inf]),[1, Inf, NaN, NaN])

  Location  |  Observed  |  Expected  |  Reason
     .          O(1x5)       E(1x4)      Dimensions don't match
>> unique ([1,NaN,Inf,NaN,Inf])
ans =
     1   NaN   Inf   NaN   Inf

6.4.0 does it differently:

>> unique ([1,NaN,Inf,NaN,Inf])
ans =
     1   Inf   NaN   NaN

I'm still surprised by the double NaN - is that intended bug-for-bug Matlab compatibility? :-)  I saw that Matlab r2020b also returns double NaN's.

Philip Nienhuis <philipnienhuis>
Project Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by philipnienhuis (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 project members can vote.

     

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-03 mmuetzel StatusNone => Duplicate
        Open/ClosedOpen => Closed
        Dependencies- => Depends on bugs #61711
    2022-01-01 philipnienhuis Operating SystemAny => Microsoft Windows

    Back to the top


    Powered by Savane 3.9