(self)
| 1803 | self.assertIsNone(wr()) |
| 1804 | |
| 1805 | def test_create_from_buffer(self): |
| 1806 | x = mx.array(b"Hello") |
| 1807 | self.assertEqual(x.dtype, mx.uint8) |
| 1808 | self.assertEqual(x.tolist(), [72, 101, 108, 108, 111]) |
| 1809 | |
| 1810 | x = mx.array(bytearray([1, 2, 3])) |
| 1811 | self.assertEqual(x.dtype, mx.uint8) |
| 1812 | self.assertEqual(x.tolist(), [1, 2, 3]) |
| 1813 | |
| 1814 | @unittest.skipIf(not has_tf, "requires TensorFlow") |
| 1815 | def test_buffer_protocol_tf(self): |