(self)
| 1793 | self.assertIsNone(wr()) |
| 1794 | |
| 1795 | def test_array_view_ref_counting(self): |
| 1796 | a = mx.arange(3) |
| 1797 | wr = weakref.ref(a) |
| 1798 | self.assertIsNotNone(wr()) |
| 1799 | a_np = np.array(a, copy=False) |
| 1800 | a = None |
| 1801 | self.assertIsNotNone(wr()) |
| 1802 | a_np = None |
| 1803 | self.assertIsNone(wr()) |
| 1804 | |
| 1805 | def test_create_from_buffer(self): |
| 1806 | x = mx.array(b"Hello") |