ChaiBapchya commented on a change in pull request #16416: Dgl ops 2
URL: https://github.com/apache/incubator-mxnet/pull/16416#discussion_r336610926
 
 

 ##########
 File path: tests/nightly/test_large_array.py
 ##########
 @@ -1199,6 +1185,118 @@ def test_full():
     assert a[-1][-1] == 3
 
 
+def test_hyperbolic():
+    def test_arccosh(a):
+        mx_res = mx.nd.arccosh(a)
+        assert_almost_equal(mx_res[-1][-1].asnumpy(), 
np.arccosh(a[-1][-1].asnumpy()))
+
+    def test_arcsinh(a):
+        mx_res = mx.nd.arcsinh(a)
+        assert_almost_equal(mx_res[-1][-1].asnumpy(), 
np.arcsinh(a[-1][-1].asnumpy()))
+
+    def test_arctanh(a):
+        a[-1][-1] = 0   # arctanh of 1 is inf, assert_almost_equal gives 
"divide by 0" for comparing 2 inf values
+        mx_res = mx.nd.arctanh(a)
+        assert_almost_equal(mx_res[-1][-1].asnumpy(), 
np.arctanh(a[-1][-1].asnumpy()))
+
 
 Review comment:
   merged

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