-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior
Description
I notice that any NaN values inside a data will mess up Julia’s unique function.
For example I have a matrix A with 3 duplicate rows:
A = [1 NaN 3; 1 NaN 3; 1 NaN 3];
3×3 Matrix{Float64}:
1.0 NaN 3.0
1.0 NaN 3.0
1.0 NaN 3.0
If we apply unique to it as below:
B = unique(A, dims=1)
We would expect the B to be like this:
1×3 Matrix{Float64}:
1.0 NaN 3.0
But in reality, the B generated by Julia is as below:
4×3 Matrix{Float64}:
1.0 NaN 3.0
1.0 NaN 3.0
1.0 NaN 3.0
1.0 NaN 3.0
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior