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

Method test_complex_power

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

itemMethod · 0.80
arrayMethod · 0.60

Tested by

no test coverage detected