tingying2020 commented on a change in pull request #16126: [numpy] operator 
around
URL: https://github.com/apache/incubator-mxnet/pull/16126#discussion_r323716994
 
 

 ##########
 File path: tests/python/unittest/test_numpy_op.py
 ##########
 @@ -1647,6 +1647,40 @@ def hybrid_forward(self, F, a):
                         assert_almost_equal(mx_out.asnumpy(), np_out, 
rtol=1e-3, atol=1e-5)
 
 
+@with_seed()
+@use_np
+def test_np_around():
+    class TestAround(HybridBlock):
+        def __init__(self, decimals):
+            super(TestAround, self).__init__()
+            # necessary initializations
+            self.decimals = decimals
+
+        def hybrid_forward(self, F, x):
+            return F.np.around(x, self.decimals)
+    
+    shapes = [(), (1,), (1, 1), (1, 2, 3), (1, 0), (3, 0, 2)] # test_shapes, 
remember to include zero-dim shape and zero-size shapes
+    types = ['int32', 'int64', 'float32', 'double']
+    for hybridize in [True, False]:
+        for oneType in types:
+            rtol=1e-3
+            atol=1e-5
+            for shape in shapes:
+                for d in range(-10, 11):
 
 Review comment:
   Done.

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

Reply via email to