MCPcopy Create free account
hub / github.com/ml-explore/mlx / test_sin

Method test_sin

python/tests/test_ops.py:1023–1030  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1021 self.assertTrue(mx.allclose(result, expected))
1022
1023 def test_sin(self):
1024 a = mx.array(
1025 [0, math.pi / 4, math.pi / 2, math.pi, 3 * math.pi / 4, 2 * math.pi]
1026 )
1027 result = mx.sin(a)
1028 expected = np.sin(a, dtype=np.float32)
1029
1030 self.assertTrue(np.allclose(result, expected))
1031
1032 def test_cos(self):
1033 a = mx.array(

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected