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