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 2020/10/04 03:18:43 UTC
[GitHub] [incubator-mxnet] xidulu commented on a change in pull request #19285: [Numpy] Support `mxnet.numpy.ndarray.diagonal()`
xidulu commented on a change in pull request #19285:
URL: https://github.com/apache/incubator-mxnet/pull/19285#discussion_r499201262
##########
File path: tests/python/unittest/test_numpy_op.py
##########
@@ -9244,21 +9243,24 @@ def hybrid_forward(self, F, a):
rtol = 1e-2 if dtype == np.float16 else 1e-3
atol = 1e-4 if dtype == np.float16 else 1e-5
- shape = config[0]
- axis = config[1]
- axis1 = axis[0]
- axis2 = axis[1]
+ shape, (axis1, axis2) = config
x = np.random.uniform(-5.0, 5.0, size=shape).astype(dtype)
x.attach_grad()
test_diagonal = TestDiagonal(k, axis1, axis2)
Review comment:
The test case you modified did not cover the hybridize case (i.e. the symbol mode), so I suggest changing the function call at https://github.com/apache/incubator-mxnet/blob/master/tests/python/unittest/test_numpy_op.py#L9243 as well to test if your patch is fully compatible with hybrid block.
----------------------------------------------------------------
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