asitstands commented on a change in pull request #10048: [MXNET-68] Random shuffle implementation URL: https://github.com/apache/incubator-mxnet/pull/10048#discussion_r173621707
########## File path: tests/python/unittest/test_random.py ########## @@ -552,6 +554,56 @@ def compute_expected_prob(): mx.test_utils.assert_almost_equal(exp_cnt_sampled.asnumpy(), exp_cnt[sampled_classes].asnumpy(), rtol=1e-1, atol=1e-2) mx.test_utils.assert_almost_equal(exp_cnt_true.asnumpy(), exp_cnt[true_classes].asnumpy(), rtol=1e-1, atol=1e-2) +@with_seed() +def test_shuffle(): + def hash(arr): Review comment: We need to distinguish the order of the elements in the array and so need to take care of all elements. This is a simple one to one hash but does its job and it seems not a bottleneck. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services