MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / test_asinh

Function test_asinh

imperative/python/test/unit/functional/test_elemwise.py:151–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149
150
151def test_asinh():
152 np.random.seed(42)
153 x = np.random.randn(100).astype("float32")
154 y_np = np.arcsinh(x)
155 y_mge = F.asinh(tensor(x)).numpy()
156 np.testing.assert_almost_equal(y_np, y_mge, decimal=5)
157
158
159def test_acosh():

Callers

nothing calls this directly

Calls 4

seedMethod · 0.45
astypeMethod · 0.45
numpyMethod · 0.45
asinhMethod · 0.45

Tested by

no test coverage detected