(self)
| 9 | |
| 10 | class TestInit(mlx_tests.MLXTestCase): |
| 11 | def test_constant(self): |
| 12 | value = 5.0 |
| 13 | |
| 14 | for dtype in [mx.float32, mx.float16]: |
| 15 | initializer = init.constant(value, dtype) |
| 16 | for shape in [(3,), (3, 3), (3, 3, 3)]: |
| 17 | result = initializer(mx.array(mx.zeros(shape))) |
| 18 | with self.subTest(shape=shape): |
| 19 | self.assertEqual(result.shape, shape) |
| 20 | self.assertEqual(result.dtype, dtype) |
| 21 | |
| 22 | def test_normal(self): |
| 23 | mean = 0.0 |
nothing calls this directly
no test coverage detected