access2rohit 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_r335295882
########## 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: same as below ---------------------------------------------------------------- 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