We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
argmax
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
This package incorrectly implements argmax for ChainedVectors. It returns the maximum value, rather than its index.
ChainedVector
julia> using SentinelArrays julia> arrays = [ [18, 70, 92, 15, 65], [25, 14, 95, 54, 57] ]; julia> cv = ChainedVector(arrays); julia> argmax(cv) 95 julia> argmax(collect(cv)) 8
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:
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 findmin seems to be wrong.
findmin
Sorry, something went wrong.
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?
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
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: