iblis17 commented on a change in pull request #16234: [MXNET-1426] Fix the
wrong result of sum, mean, argmin, argmax when inputs contain inf or nan
URL: https://github.com/apache/incubator-mxnet/pull/16234#discussion_r327388085
##########
File path: julia/test/unittest/ndarray.jl
##########
@@ -1547,8 +1547,8 @@ function test_argmin()
NaN 2 6]
x = NDArray(A)
- @test copy(argmin(x, dims = 1)) == [1 2 1]
- @test copy(argmin(x, dims = 2)) == reshape([1, 2], :, 1)
+ @test copy(argmin(x, dims = 1)) == [2 2 1]
Review comment:
```julia
julia> A
2×3 Array{Float64,2}:
1.0 5.0 3.0
NaN 2.0 6.0
julia> argmin(A, dims = 1)
1×3 Array{CartesianIndex{2},2}:
CartesianIndex(2, 1) CartesianIndex(2, 2) CartesianIndex(1, 3)
```
note that Julia is 1-based index
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services