(self)
| 473 | self.assertTrue(math.isnan(mx.maximum(b, a).item())) |
| 474 | |
| 475 | def test_floor(self): |
| 476 | x = mx.array([-22.03, 19.98, -27, 9, 0.0, -np.inf, np.inf]) |
| 477 | expected = [-23, 19, -27, 9, 0, -np.inf, np.inf] |
| 478 | self.assertListEqual(mx.floor(x).tolist(), expected) |
| 479 | |
| 480 | with self.assertRaises(ValueError): |
| 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]) |