(self)
| 477 | with self.assertRaises(AttributeError): Tensor([3], dtype=(dtypes.int,)) |
| 478 | |
| 479 | def test_tensor_bytes(self): |
| 480 | data = b"abc123" |
| 481 | t = Tensor(data) |
| 482 | assert t.dtype == dtypes.uint8 |
| 483 | assert t.shape == (6,) |
| 484 | np.testing.assert_equal(t.numpy(), list(data)) |
| 485 | |
| 486 | def test_tensor_copy(self): |
| 487 | x = copy.deepcopy(Tensor.ones((3,3,3))) |
nothing calls this directly
no test coverage detected