(self)
| 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( |