Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The isntequal() function is not working 100% as I want #15

Open
cserteGT3 opened this issue May 7, 2020 · 0 comments
Open

The isntequal() function is not working 100% as I want #15

cserteGT3 opened this issue May 7, 2020 · 0 comments

Comments

@cserteGT3
Copy link
Owner

From #12:
The isntequal() function is not working 100% as I want:

julia> t1 = (a1 = [1,2,3], b=4)
(a1 = [1, 2, 3], b = 4)

julia> t2 = (a1 = [2,3,1], b=4)
(a1 = [2, 3, 1], b = 4)

julia> isntequal(t1,t2)
false

The two arrays are different, but they have the same elements, therefore in this case they are equal. One workaround would be to sort the arrays:

function isntequal(t1::T1,t2::T2) where {T1<:AbstractArray, T2<:AbstractArray}
    return sort(t1) == sort(t2)
end

but sort() is not define for FittedShape types, so it's not a real workaround.

It only affects tests, so I'll just open an issue for the record.

Originally posted by @cserteGT3 in #12 (comment)

@cserteGT3 cserteGT3 changed the title The isntequal() function is not working 100% as I want: The isntequal() function is not working 100% as I want May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant