mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-07 17:44:38 +08:00
no segfault with uninitialized array.at (#2514)
This commit is contained in:
@@ -1365,6 +1365,9 @@ class TestArray(mlx_tests.MLXTestCase):
|
||||
|
||||
def test_array_at(self):
|
||||
a = mx.array(1)
|
||||
with self.assertRaises(ValueError):
|
||||
a.at.add(1)
|
||||
|
||||
a = a.at[None].add(1)
|
||||
self.assertEqual(a.item(), 2)
|
||||
|
||||
|
Reference in New Issue
Block a user