You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/03/04 07:42:31 UTC

[GitHub] [incubator-mxnet] wkcn commented on a change in pull request #14314: support long for mx.random.seed

wkcn commented on a change in pull request #14314: support long for mx.random.seed
URL: https://github.com/apache/incubator-mxnet/pull/14314#discussion_r261947315
 
 

 ##########
 File path: tests/python/unittest/test_random.py
 ##########
 @@ -717,12 +717,24 @@ def test_random_seed():
     shape = (5, 5)
     seed = rnd.randint(-(1 << 31), (1 << 31))
     mx.random.seed(seed)
-    v1 = mx.nd.random_uniform(shape=shape)
+
+    def _assert_same_mx_arrays(a, b):
+        assert len(a) == len(b)
+        for a_i, b_i in zip(a, b):
+            assert (a_i.asnumpy() == b_i.asnumpy()).all()
+
+    N = 100
+    v1 = [mx.nd.random_uniform(shape=shape) for _ in range(N)]
 
 Review comment:
   Updated. Thank you!

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


With regards,
Apache Git Services