(self)
| 3182 | self.assertTrue(np.allclose(mx.rsqrt(x), 1.0 / np.sqrt(x))) |
| 3183 | |
| 3184 | def test_complex_power(self): |
| 3185 | out = mx.power(mx.array(0j), 2) |
| 3186 | self.assertEqual(out.item(), 0j) |
| 3187 | |
| 3188 | out = mx.power(mx.array(0j), float("nan")) |
| 3189 | self.assertTrue(mx.isnan(out)) |
| 3190 | |
| 3191 | def test_irregular_alignments(self): |
| 3192 | # Unaligned unary op |