ChaiBapchya commented on a change in pull request #15882: Move Windows CI build 
to a 64-bit toolchain to fix 'out of heap space'.
URL: https://github.com/apache/incubator-mxnet/pull/15882#discussion_r314188929
 
 

 ##########
 File path: tests/python/unittest/test_random.py
 ##########
 @@ -893,14 +893,15 @@ def compute_expected_prob():
 def test_shuffle():
     def check_first_axis_shuffle(arr):
         stride = int(arr.size / arr.shape[0])
-        column0 = arr.reshape((arr.size,))[::stride].sort()
+        column0 = arr.reshape((arr.size,))[::stride]
         seq = mx.nd.arange(0, arr.size - stride + 1, stride, ctx=arr.context)
-        assert (column0 == seq).prod() == 1
-        for i in range(arr.shape[0]):
-            subarr = arr[i].reshape((arr[i].size,))
-            start = subarr[0].asscalar()
-            seq = mx.nd.arange(start, start + stride, ctx=arr.context)
-            assert (subarr == seq).prod() == 1
+        assert (column0.sort() == seq).prod() == 1
 
 Review comment:
   curious to know what difference it makes by moving sort?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to