Skip to content

Commit

Permalink
For comparison, tensors need to be converted to numpy format
Browse files Browse the repository at this point in the history
because PR apache#14443 is not approved yet in upstream
  • Loading branch information
drivanov committed Sep 26, 2019
1 parent e9619f8 commit ffda1b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/python/unittest/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7625,7 +7625,7 @@ def run_test_argmax(multi_output, ctx, axis=None):

max = mx.nd.argmax(tensor, axis=axis)
topk_data = mx.nd.topk(tensor, axis=axis, is_ascend=0, k=1)
assert_almost_equal(max.reshape(-1), topk_data.reshape(-1))
assert_almost_equal(max.reshape(-1).asnumpy(), topk_data.reshape(-1).asnumpy())

ctx = default_context()
for multi_output in [False, True]:
Expand Down

0 comments on commit ffda1b7

Please sign in to comment.