-
Notifications
You must be signed in to change notification settings - Fork 18
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
argmax
returns incorrect results
#97
Comments
huh.... julia> using SentinelArrays
Precompiling SentinelArrays
1 dependency successfully precompiled in 2 seconds
julia> x2 = ChainedVector([[2,1,3], [4,5,6], [7,8,10,9]])
10-element ChainedVector{Int64, Vector{Int64}}:
2
1
3
4
5
6
7
8
10
9
julia> findmin(x2)
(1, 1)
julia> findmin(x2 |> collect)
(1, 2) is this just completely wrong? even the |
PRs welcome! |
I will try tmr but this is a pretty critical problem that also runs somewhat deep, you sure you trust first timer PR? |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This package incorrectly implements
argmax
forChainedVector
s. It returns the maximum value, rather than its index.The implementation is here and is tested, though the test only tests a simple special case for which the values and indices are exactly equal.
This issue was initially reported upstream.
The text was updated successfully, but these errors were encountered: