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/10/16 00:40:49 UTC

[GitHub] [incubator-mxnet] anirudh2290 commented on a change in pull request #16477: added more tests to verify support for large vector

anirudh2290 commented on a change in pull request #16477: added more tests to verify support for large vector
URL: https://github.com/apache/incubator-mxnet/pull/16477#discussion_r335234920
 
 

 ##########
 File path: tests/nightly/test_large_vector.py
 ##########
 @@ -708,6 +708,182 @@ def test_full():
     assert a[-1] == 3
 
 
+def test_astype():
+    x = create_vector(size=LARGE_X//4)
+    x = nd.tile(x, 4)
+    y = x.astype('int32')
+    assert y.dtype == np.int32
+    assert y[-1] == LARGE_X//4-1
+
+
+def test_cast():
+    x = create_vector(size=LARGE_X//4)
+    x = nd.tile(x, 4)
+    y = nd.cast(x, np.int32)
+    assert y.dtype == np.int32
+    assert y[-1] == LARGE_X//4-1
+
+
+def test_repeat():
+    x = create_vector(size=LARGE_X//2)
+    y = nd.repeat(x, repeats=2, axis = 0)
+    assert y.shape[0] == LARGE_X
+    assert y[1] == 0
+    assert y[LARGE_X-1] == LARGE_X//2-1
+
+
+def create_input_for_rounding_ops():
+    inp = nd.arange(-LARGE_X//2, LARGE_X//2, dtype=np.float64)
+    inp = inp/2
+    return inp
+
+
+def test_ceil():
+    x = create_input_for_rounding_ops()
+    y = nd.ceil(x)
+    assert y[LARGE_X//2-2] == -1
 
 Review comment:
   what is this testing, can you add some comment here.

----------------------------------------------------------------
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