(self)
| 158 | self.assertEqual(out.item(), 4) |
| 159 | |
| 160 | def test_function_creates_array(self): |
| 161 | def fun(x): |
| 162 | return x + mx.array(1) |
| 163 | |
| 164 | cfun = mx.compile(fun) |
| 165 | out = cfun(mx.array(3)) |
| 166 | self.assertEqual(out.item(), 4) |
| 167 | |
| 168 | # And again |
| 169 | out = cfun(mx.array(3)) |
| 170 | self.assertEqual(out.item(), 4) |
| 171 | |
| 172 | def test_enable_disable(self): |
| 173 | def fun(x): |