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

Method test_ceil

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

Source from the content-addressed store, hash-verified

481 mx.floor(mx.array([22 + 3j, 19 + 98j]))
482
483 def test_ceil(self):
484 x = mx.array([-22.03, 19.98, -27, 9, 0.0, -np.inf, np.inf])
485 expected = [-22, 20, -27, 9, 0, -np.inf, np.inf]
486 self.assertListEqual(mx.ceil(x).tolist(), expected)
487
488 with self.assertRaises(ValueError):
489 mx.ceil(mx.array([22 + 3j, 19 + 98j]))
490
491 def test_isposinf(self):
492 x = mx.array([0.0, float("-inf")])

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.60

Tested by

no test coverage detected