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

Function test_sinh

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

Source from the content-addressed store, hash-verified

141
142
143def test_sinh():
144 np.random.seed(42)
145 x = np.random.randn(100).astype("float32")
146 y_np = np.sinh(x)
147 y_mge = F.sinh(tensor(x)).numpy()
148 np.testing.assert_allclose(y_np, y_mge, rtol=1e-5)
149
150
151def test_asinh():

Callers

nothing calls this directly

Calls 4

seedMethod · 0.45
astypeMethod · 0.45
sinhMethod · 0.45
numpyMethod · 0.45

Tested by

no test coverage detected