Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 652 Bytes

18070.improvement.rst

File metadata and controls

12 lines (11 loc) · 652 Bytes

np.unique now returns single NaN

When np.unique operated on an array with multiple NaN entries, its return included a NaN for each entry that was NaN in the original array. This is now improved such that the returned array contains just one NaN as the last element.

Also for complex arrays all NaN values are considered equivalent (no matter whether the NaN is in the real or imaginary part). As the representant for the returned array the smallest one in the lexicographical order is chosen - see np.sort for how the lexicographical order is defined for complex arrays.