ptrendx commented on a change in pull request #14097: Relaxing type 
requirements for slice_like op
URL: https://github.com/apache/incubator-mxnet/pull/14097#discussion_r256608217
 
 

 ##########
 File path: tests/python/unittest/test_operator.py
 ##########
 @@ -2515,6 +2515,20 @@ def test_slice_like():
             assert_allclose(xx, xgrad.asnumpy())
             assert_allclose(xgrad1.asnumpy(), 
mx.nd.zeros_like(xgrad1).asnumpy())
 
+@with_seed()
+def test_slice_like_different_types():
+    x = [[  1.,   2.,   3.,   4.],
 
 Review comment:
   Those parameters do not matter for this test (and they are already tested in 
the dedicated test of `slice_like` op functionality) - the values for `x` and 
`y` were taken from the example from `slice_like` documentation. The only thing 
that matters is the type of `y` in this test. Before this PR this code would 
not work - it would throw an exception during type inference. With this PR, 
this code works (as it should).

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

Reply via email to